apply_filters( 'themes_api', false|object|array $override, string $action, object $args )
- Since
- 2.8.0
Filters whether to override the WordPress.org Themes API.
Description
Returning 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.
Compatibility
- WordPress
- since 2.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$overridefalse|object|array- Whether to override the WordPress.org Themes API. Default false.
$actionstring- Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'.
$argsobject- Arguments used to query for installer pages from the Themes API.
Where this hook fires · 1
wp-admin/includes/theme.php:542themes_api()
Source code
* * @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. */ $res = apply_filters( 'themes_api', false, $action, $args ); if ( ! $res ) { $url = 'http://api.wordpress.org/themes/info/1.2/'; $url = add_query_arg( array( 'action' => $action,Changelog
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.