themes_api_args хук-фильтрWP 2.8.0

Filters arguments used to query for installer pages from the WordPress.org Themes API.

Important: An object MUST be returned to this filter.

Использование

add_filter( 'themes_api_args', 'wp_kama_themes_api_args_filter', 10, 2 );

/**
 * Function for `themes_api_args` filter-hook.
 * 
 * @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'.
 *
 * @return object
 */
function wp_kama_themes_api_args_filter( $args, $action ){

	// filter...
	return $args;
}
$args(объект)
Arguments used to query for installer pages from the WordPress.org Themes API.
$action(строка)
Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

themes_api()
themes_api_args
wp-admin/includes/theme.php 520
$args = apply_filters( 'themes_api_args', $args, $action );

Где используется хук в WordPress

Использование не найдено.