wp_using_themes

函式
wp_using_themes ( No parameters )
返回值
  • (bool) True if themes should be used, false otherwise.
定義位置
相關方法
wp_get_themeswp_paused_themeswp_get_themewp_update_themeswp_is_using_https
引入
5.1.0
棄用
-

wp_using_themes: 這個函式檢查WordPress是否正在使用主題。如果WordPress正在使用主題,它返回true,否則返回false。

確定當前請求是否應該使用主題。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_using_themes() {
/**
* Filters whether the current request should use themes.
*
* @since 5.1.0
*
* @param bool $wp_using_themes Whether the current request should use themes.
*/
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
}
function wp_using_themes() { /** * Filters whether the current request should use themes. * * @since 5.1.0 * * @param bool $wp_using_themes Whether the current request should use themes. */ return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES ); }
function wp_using_themes() {
	/**
	 * Filters whether the current request should use themes.
	 *
	 * @since 5.1.0
	 *
	 * @param bool $wp_using_themes Whether the current request should use themes.
	 */
	return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
}

常見問題

FAQs
檢視更多 >