WP_Customize_Manager::remove_panel( string $id )

Remove a customize panel.

Description Description

Note that removing the panel doesn’t destroy the WP_Customize_Panel instance or remove its filters.

Top ↑

Parameters Parameters


(string) (Required) Panel ID to remove.

Top ↑

Source Source

File: wp-includes/class-wp-customize-manager.php

	public function remove_panel( $id ) {
		// Removing core components this way is _doing_it_wrong().
		if ( in_array( $id, $this->components, true ) ) {
					/* translators: 1: Panel ID, 2: Link to 'customize_loaded_components' filter reference. */
					__( 'Removing %1$s manually will cause PHP warnings. Use the %2$s filter instead.' ),
						'<a href="%1$s">%2$s</a>',
						esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ),
		unset( $this->panels[ $id ] );

Top ↑

Changelog Changelog

Version Description
4.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.