customize_load_themes
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().
Usage
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(array|stdClass)
- Nested array or object of theme data.
- $args(array)
- List of arguments, such as page, search term, and tags to query for.
- $manager(WP_Customize_Manager)
- Instance of Customize manager.
Changelog
Since 4.9.0 | Introduced. |
Where the hook is called
customize_load_themes
wp-includes/class-wp-customize-manager.php 5987
$themes = apply_filters( 'customize_load_themes', $themes, $args, $this );