[wp-trac] [WordPress Trac] #30235: Improve ability to filter active state for widget area Customizer sections

WordPress Trac noreply at wordpress.org
Tue Nov 11 22:56:50 UTC 2014


#30235: Improve ability to filter active state for widget area Customizer sections
--------------------------+-------------------------
 Reporter:  westonruter   |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  4.1
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+-------------------------

Comment (by ocean90):

 The change in `src/wp-admin/js/customize-controls.js` hides my test panel:


 {{{
 add_action( 'customize_register', function() {
         global $wp_customize;

         $wp_customize->add_panel( 'foo', array(
                 'title'    => 'Foo',
                 'capability' => 'customize',
         //      'priority' => 1,
         ) );

         $wp_customize->add_section( 'bar', array(
                 'title' => 'Bar',
                 'capability' => 'edit_posts',
                 'panel' => 'foo'
         ) );

         $wp_customize->add_setting( 'foobar[foo]', array(
                 'default'    => 'Foo',
                 'capability' => 'edit_posts',
                 'type'       => 'option',
         ));

         $wp_customize->add_control('foobar', array(
                 'label'    => 'Foobar',
                 'section'  => 'bar',
                 'settings' => 'foobar[foo]',
                 'type'     => 'textarea',
         ));
 });
 }}}

 Can we fix this or shoudl we exclude it from the patch for now?

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


More information about the wp-trac mailing list