WP_Customize_Manager::remove_control( string $id )

Removes a customize control.

Description

Note that removing the control doesn’t destroy the WP_Customize_Control instance or remove its filters.

Parameters

$idstringrequired
ID of the control.

Source

public function remove_control( $id ) {
	unset( $this->controls[ $id ] );
}

Changelog

VersionDescription
3.4.0Introduced.

User Contributed Notes

  1. Skip to note 4 content

    custom_logo for the logo

    if ( ! function_exists( 'custom_customize_register' ) ) {
    	/**
    	 * Register basic customizer support.
    	 *
    	 * @param object $wp_customize Customizer reference.
    	 */
    	function custom_customize_register( $wp_customize ) {
    		$wp_customize->remove_control("custom_logo");
    	}
    }
    add_action( 'customize_register', 'custom_customize_register' );

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