[wp-trac] [WordPress Trac] #46377: Can't remove Customizer sections whose ID contains a hyphen.

WordPress Trac noreply at wordpress.org
Thu Feb 28 21:13:12 UTC 2019


#46377: Can't remove Customizer sections whose ID contains a hyphen.
----------------------------+------------------------------
 Reporter:  jeremybubbleup  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Customize       |     Version:  5.1
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by jeremybubbleup):

 Parent theme has this:
 {{{
 function fup20_customize_register($wp_customize) {
         ...
         $wp_customize->add_section('fup20-header', array(
                 'title' => __('Header', 'fup20'),
         ));
         $wp_customize->add_setting(...);
         $wp_customize->add_control(...'section' => 'fup20-header'...);
         ...
         $wp_customize->get_section('fup20-header')->priority = 60;
 }
 add_action('customize_register', 'fup20_customize_register');
 }}}

 and the child theme wants to remove that section:


 {{{
 function child_theme_customizer( $wp_customize ) {
         $wp_customize->remove_section('fup20-header');
 }
 add_action('customize_register', 'cci_lex_customizer', 100);
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46377#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list