themes_api

過濾鉤子
apply_filters( 'themes_api', false, $action, $args )
引數
  • (false|object|array) $override Whether to override the WordPress.org Themes API. Default false.
    Required:
  • (string) $action Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'.
    Required:
  • (object) $args Arguments used to query for installer pages from the Themes API.
    Required:
定義位置
相關勾子
themes_api_argsthemes_api_resulttheme_localeall_themestheme_row_meta
相關方法
themes_apithe_metathe_idget_themesget_theme_dataadd_theme_page
引入
2.8.0
棄用
-

themes_api是一個WordPress的動作鉤子,當向WordPress.org Theme API發出請求時被觸發。這個鉤子允許開發者在API請求中新增額外的資料,例如關於請求的主題的資訊。

過濾是否覆蓋WordPress.org Themes API。

返回一個非假的值將有效地縮短WordPress.org的API請求。

如果$action是”query_themes”、”theme_information”或”feature_list”,必須傳遞一個物件。be passed. 如果$action是’hot_tags’,應該傳遞一個陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$res = apply_filters( 'themes_api', false, $action, $args );
$res = apply_filters( 'themes_api', false, $action, $args );
$res = apply_filters( 'themes_api', false, $action, $args );

常見問題

FAQs
檢視更多 >