Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#33648 closed defect (bug) (duplicate)

Removing nav menu panel in Customizer causes PHP notice

Reported by: ericlewis's profile ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Customize Keywords:
Focuses: Cc:

Description (last modified by ericlewis)

I'm removing the nav menu panel contextually for a minimalist Customizer experience.

If you remove the nav menu panel, the l10n configuration breaks because it directly attempts to get the title from the nav menu panel object.

e.g.

<?php
add_action( 'customize_register', function($manager) {
        global $wp_customize;

        foreach ( $wp_customize->panels() as $key => $panel ) {
                $wp_customize->remove_panel( $key );
        }

        foreach ( $wp_customize->sections() as $key => $section ) {
                $wp_customize->remove_section( $key );
        }

}, 50, 1 );

Change History (3)

#1 @ericlewis
11 years ago

  • Description modified (diff)

#2 @ericlewis
11 years ago

  • Description modified (diff)

#3 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #33411.

Note: See TracTickets for help on using tickets.