themes_api_args
Filters arguments used to query for installer pages from the WordPress.org Themes API.
Description
Important: An object MUST be returned to this filter.
Parameters (2)
- 0. $args (object)
- Arguments used to query for installer pages from the WordPress.org Themes API.
- 1. $action (string)
- Requested action. Likely values are theme_information,, feature_list., or query_themes.
Usage
- To run the hook, copy the example below.
- $args = apply_filters( 'themes_api_args', $args, $action );
- if ( !empty( $args ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the themes_api_args callback
- function filter_themes_api_args( $args, $action ) {
- // make filter magic happen here...
- return $args;
- };
- // add the filter
- add_filter( 'themes_api_args', 'filter_themes_api_args', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'themes_api_args', 'filter_themes_api_args', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/theme.php
- $args = apply_filters( 'themes_api_args', $args, $action );