customize_load_themes
Filter HookDescription
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()` or WordPress.org via `themes_api()`.Hook Information
File Location |
wp-includes/class-wp-customize-manager.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5987 |
Hook Parameters
Type | Name | Description |
---|---|---|
array|stdClass
|
$themes
|
Nested array or object of theme data. |
array
|
$args
|
List of arguments, such as page, search term, and tags to query for. |
WP_Customize_Manager
|
$manager
|
Instance of Customize manager. |
Usage Examples
Basic Usage
<?php
// Hook into customize_load_themes
add_filter('customize_load_themes', 'my_custom_filter', 10, 3);
function my_custom_filter($themes, $args, $manager) {
// Your custom filtering logic here
return $themes;
}
Source Code Context
wp-includes/class-wp-customize-manager.php:5987
- How this hook is used in WordPress core
<?php
5982 *
5983 * @param array|stdClass $themes Nested array or object of theme data.
5984 * @param array $args List of arguments, such as page, search term, and tags to query for.
5985 * @param WP_Customize_Manager $manager Instance of Customize manager.
5986 */
5987 $themes = apply_filters( 'customize_load_themes', $themes, $args, $this );
5988
5989 wp_send_json_success( $themes );
5990 }
5991
5992
PHP Documentation
<?php
/**
* 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()`
* or WordPress.org via `themes_api()`.
*
* @since 4.9.0
*
* @see wp_prepare_themes_for_js()
* @see themes_api()
* @see WP_Customize_Manager::__construct()
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/class-wp-customize-manager.php
Related Hooks
Related hooks will be displayed here in future updates.