customize_load_themes хук-фильтрWP 4.9.0

Filters the theme data loaded in the customizer.

This allows theme data to be loading from an external source, or modification of data loaded from wp_prepare_themes_for_js() WordPress.org via themes_api().

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

add_filter( 'customize_load_themes', 'wp_kama_customize_load_themes_filter', 10, 3 );

/**
 * Function for `customize_load_themes` filter-hook.
 * 
 * @param array|stdClass       $themes  Nested array or object of theme data.
 * @param array                $args    List of arguments, such as page, search term, and tags to query for.
 * @param WP_Customize_Manager $manager Instance of Customize manager.
 *
 * @return array|stdClass
 */
function wp_kama_customize_load_themes_filter( $themes, $args, $manager ){

	// filter...
	return $themes;
}
$themes(массив|stdClass)
Nested array or object of theme data.
$args(массив)
List of arguments, such as page, search term, and tags to query for.
$manager(WP_Customize_Manager)
Instance of Customize manager.

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

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

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

WP_Customize_Manager::handle_load_themes_request()
customize_load_themes
wp-includes/class-wp-customize-manager.php 5945
$themes = apply_filters( 'customize_load_themes', $themes, $args, $this );

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

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