Docs: Improve the hook documentation for the themes_api
filter.
Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the `$action` type. Also updates the expected types on the `$override` parameter. See #34036. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@34651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c6c2afd70b
commit
df542a1802
@ -406,12 +406,14 @@ function themes_api( $action, $args = array() ) {
|
||||
/**
|
||||
* Filter whether to override the WordPress.org Themes API.
|
||||
*
|
||||
* Returning a value of true to this filter allows a theme to completely
|
||||
* override the built-in WordPress.org API.
|
||||
* Passing a non-false value will effectively short-circuit the WordPress.org API request.
|
||||
*
|
||||
* If `$action` is 'query_themes', 'theme_information', or 'feature_list', an object MUST
|
||||
* be passed. If `$action` is 'hot_tags`, an array should be passed.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param bool $bool Whether to override the WordPress.org Themes API. Default false.
|
||||
* @param false|object|array $override Whether to override the WordPress.org Themes API. Default false.
|
||||
* @param string $action Requested action. Likely values are 'theme_information',
|
||||
* 'feature_list', or 'query_themes'.
|
||||
* @param object $args Arguments used to query for installer pages from the Themes API.
|
||||
|
Loading…
Reference in New Issue
Block a user