Uses
| Uses | Description |
|---|---|
| wp-includes/l10n.php: __() | Retrieve the translation of $text. |
| wp-includes/formatting.php: esc_url() | Checks and cleans a URL. |
| wp-includes/functions.php: _doing_it_wrong() | Mark something as being incorrectly called. |
Remove a customize panel.
Note that removing the panel doesn’t destroy the WP_Customize_Panel instance or remove its filters.
(string) (Required) Panel ID to remove.
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 ) ) {
$message = sprintf(
/* 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.' ),
$id,
sprintf(
'<a href="%1$s">%2$s</a>',
esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ),
'<code>customize_loaded_components</code>'
)
);
_doing_it_wrong( __METHOD__, $message, '4.5.0' );
}
unset( $this->panels[ $id ] );
} | Version | Description |
|---|---|
| 4.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/remove_panel