WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Customize_Manager::remove_panel() public WP 4.0.0

Remove a customize panel.

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

{} Это метод класса: WP_Customize_Manager{}

Хуков нет.


Null. Ничего.


$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->remove_panel( $id );
$id(строка) (обязательный)
Panel ID to remove.

Список изменений

С версии 4.0.0 Введена.

Код WP_Customize_Manager::remove_panel() WP 5.5.3

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.' ),
				'<a href="%1$s">%2$s</a>',
				esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ),

		_doing_it_wrong( __METHOD__, $message, '4.5.0' );
	unset( $this->panels[ $id ] );