wp_using_themes

過濾鉤子
apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' )
引數
  • (bool) $wp_using_themes Whether the current request should use themes.
    Required:
定義位置
相關勾子
wp_trusted_keyswp_unique_term_slugwp_sitemaps_initwp_revisions_to_keeppre_get_terms
相關方法
wp_using_themeswp_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
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );

常見問題

FAQs
檢視更多 >