Title: customize_loaded_components
Published: December 9, 2015
Last modified: August 20, 2026

---

# apply_filters( ‘customize_loaded_components’, string[] $components, WP_Customize_Manager $manager )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#user-contributed-notes)

Filters the core Customizer components to load.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#description)󠁿

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’](https://developer.wordpress.org/reference/hooks/plugins_loaded/)
action, so it cannot be added in a theme.

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#see-also)󠁿

 * [WP_Customize_Manager::__construct()](https://developer.wordpress.org/reference/classes/WP_Customize_Manager/__construct/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#parameters)󠁿

 `$components`string[]

Array of core components to load.

`$manager`[WP_Customize_Manager](https://developer.wordpress.org/reference/classes/wp_customize_manager/)

[WP_Customize_Manager](https://developer.wordpress.org/reference/classes/wp_customize_manager/)
instance.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#source)󠁿

    ```php
    $components = apply_filters( 'customize_loaded_components', $this->components, $this );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-manager.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-customize-manager.php#L359)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-customize-manager.php#L359-L359)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Customize_Manager::__construct()](https://developer.wordpress.org/reference/classes/wp_customize_manager/__construct/)`wp-includes/class-wp-customize-manager.php` |

Constructor.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#comment-content-1005)
 2.    [Drew Jaynes](https://profiles.wordpress.org/drewapicture/)  [  11 years ago  ](https://developer.wordpress.org/reference/hooks/customize_loaded_components/#comment-1005)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%23comment-1005)
     Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%23comment-1005)
 4.  **Remove the ‘Menus’ panel from the Customizer**
 5.      ```php
         /**
          * Removes the core 'Menus' panel from the Customizer.
          *
          * @param array $components Core Customizer components list.
          * @return array (Maybe) modified components list.
          */
         function wpdocs_remove_nav_menus_panel( $components ) {
         	$i = array_search( 'nav_menus', $components );
         	if ( false !== $i ) {
         		unset( $components[ $i ] );
         	}
         	return $components;
         }
         add_filter( 'customize_loaded_components', 'wpdocs_remove_nav_menus_panel' );
         ```
     
 6.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%3Freplytocom%3D1005%23feedback-editor-1005)
 7.   [Skip to note 4 content](https://developer.wordpress.org/reference/hooks/customize_loaded_components/?output_format=md#comment-content-1006)
 8.    [Drew Jaynes](https://profiles.wordpress.org/drewapicture/)  [  11 years ago  ](https://developer.wordpress.org/reference/hooks/customize_loaded_components/#comment-1006)
 9.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%23comment-1006)
     Vote results for this note: 2[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%23comment-1006)
 10. **Remove the ‘Widgets’ panel from the Customizer**
 11.     ```php
         /**
          * Removes the core 'Widgets' panel from the Customizer.
          *
          * @param array $components Core Customizer components list.
          * @return array (Maybe) modified components list.
          */
         function wpdocs_remove_widgets_panel( $components ) {
         	$i = array_search( 'widgets', $components );
         	if ( false !== $i ) {
         		unset( $components[ $i ] );
         	}
         	return $components;
         }
         add_filter( 'customize_loaded_components', 'wpdocs_remove_widgets_panel' );
         ```
     
 12.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F%3Freplytocom%3D1006%23feedback-editor-1006)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_loaded_components%2F)
before being able to contribute a note or feedback.