wp_theme_json_data_theme

過濾鉤子
apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' )

wp_theme_json_data_theme:這是一個 WordPress 主題的資料的常量,用於指定該主題的資料。該常量在主題的初始化過程中定義,並且主題的資料將儲存在此常量中。

過濾主題提供的全域性樣式和設定的資料。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );
$theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );
$theme_json      = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );

常見問題

FAQs
檢視更多 >