[wp-trac] [WordPress Trac] #35855: Let selective refresh component be required but be opt-in for sidebars/widgets (for now)

WordPress Trac noreply at wordpress.org
Tue Mar 15 17:43:29 UTC 2016

#35855: Let selective refresh component be required but be opt-in for
sidebars/widgets (for now)
 Reporter:  DrewAPicture    |       Owner:  westonruter
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  4.5
Component:  Customize       |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:

Comment (by obenland):

 I'm not a fan of the `add_theme_support()` route for a variety of reasons:

 1. Introducing a new call means starting from 0 (okay, 5) in terms of
 theme adoption. 5 is a lot less than all the themes. Have we exhausted all
 options to enable it by default and be clever about maybe disabling it for
 themes that do funky things with their sidebars? While the theme support
 route is very convenient and makes things very easy in terms of backwards
 compatibility, we pay a high price with waiving adoption.
 1. Like @DrewAPicture pointed out in [comment:15], the proposed name is
 not really future proof. It actually makes it more like for the influx of
 more calls to be a problem because other Customizer features that might
 require a support declaration would add their own.
 1. The model is not really sustainable in the long run. Default themes
 come with at least three features they need to add support for (this would
 be the fourth), there are themes like Confit that already have 9 (!)
 1. The name is not very elegant, to a degree where I think it might even
 affect adoption.

 To be a bit more constructive: If adding a flag on `customize_register` is
 not an option (is it really not?) and we do decide to go the theme support
 route, may I suggest the following syntax:
 // General support.
 add_theme_support( 'customizer', 'selective-refresh' );

 // Specific widgets by `id_base`.
 add_theme_support( 'customizer', array(
         'selective-refresh' => array( 'foo', 'bar' ),
 ) );

Ticket URL: <https://core.trac.wordpress.org/ticket/35855#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list