customize_loaded_components filter-hook . WP 4.4.0
Filters the core Customizer components to load.
This allows Core components to be excluded from being instantiated by filtering them out of the array. Note that this filter generally runs during the 'plugins_loaded' action, so it cannot be added in a theme.
Usage
add_filter( 'customize_loaded_components', 'filter_function_name_2338', 10, 2 ); function filter_function_name_2338( $components, $this ){ // filter... return $components; }
- $components(string[])
- Array of core components to load.
- $this(WP_Customize_Manager)
- WP_Customize_Manager instance.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
customize_loaded_components
wp-includes/class-wp-customize-manager.php 351
$components = apply_filters( 'customize_loaded_components', $this->components, $this );