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

Filters the returned WordPress.org Themes API response.

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

add_filter( 'themes_api_result', 'wp_kama_themes_api_result_filter', 10, 3 );

/**
 * Function for `themes_api_result` filter-hook.
 * 
 * @param array|stdClass|WP_Error $res    WordPress.org Themes API response.
 * @param string                  $action Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'.
 * @param stdClass                $args   Arguments used to query for installer pages from the WordPress.org Themes API.
 *
 * @return array|stdClass|WP_Error
 */
function wp_kama_themes_api_result_filter( $res, $action, $args ){

	// filter...
	return $res;
}
$res(массив|stdClass|WP_Error)
WordPress.org Themes API response.
$action(строка)
Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'.
$args(stdClass)
Arguments used to query for installer pages from the WordPress.org Themes API.

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

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

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

themes_api()
themes_api_result
wp-admin/includes/theme.php 631
return apply_filters( 'themes_api_result', $res, $action, $args );

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

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