is_child_theme

函式
is_child_theme ( No parameters )
返回值
  • (bool) True if a child theme is in use, false otherwise.
定義位置
相關方法
switch_themedisplay_themewp_is_block_themedisplay_themesload_child_theme_textdomain
引入
3.0.0
棄用
-

is_child_theme: 這個函式檢查當前主題是否是一個子主題。如果當前主題是一個子主題,它返回true,否則返回false。

是否在使用一個子主題。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function is_child_theme() {
return ( TEMPLATEPATH !== STYLESHEETPATH );
}
function is_child_theme() { return ( TEMPLATEPATH !== STYLESHEETPATH ); }
function is_child_theme() {
	return ( TEMPLATEPATH !== STYLESHEETPATH );
}

常見問題

FAQs
檢視更多 >