themes_api_args
Filter HookDescription
Filters arguments used to query for installer pages from the WordPress.org Themes API. Important: An object MUST be returned to this filter.Hook Information
File Location |
wp-admin/includes/theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 525 |
Hook Parameters
Type | Name | Description |
---|---|---|
object
|
$args
|
Arguments used to query for installer pages from the WordPress.org Themes API. |
string
|
$action
|
Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'. |
Usage Examples
Basic Usage
<?php
// Hook into themes_api_args
add_filter('themes_api_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $action) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-admin/includes/theme.php:525
- How this hook is used in WordPress core
<?php
520 *
521 * @param object $args Arguments used to query for installer pages from the WordPress.org Themes API.
522 * @param string $action Requested action. Likely values are 'theme_information',
523 * 'feature_list', or 'query_themes'.
524 */
525 $args = apply_filters( 'themes_api_args', $args, $action );
526
527 /**
528 * Filters whether to override the WordPress.org Themes API.
529 *
530 * Returning a non-false value will effectively short-circuit the WordPress.org API request.
PHP Documentation
<?php
/**
* Filters arguments used to query for installer pages from the WordPress.org Themes API.
*
* Important: An object MUST be returned to this filter.
*
* @since 2.8.0
*
* @param object $args Arguments used to query for installer pages from the WordPress.org Themes API.
* @param string $action Requested action. Likely values are 'theme_information',
* 'feature_list', or 'query_themes'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/theme.php
Related Hooks
Related hooks will be displayed here in future updates.