[wp-trac] [WordPress Trac] #40451: Customizer: Introduce plugin management

WordPress Trac noreply at wordpress.org
Fri Aug 18 22:03:38 UTC 2017


#40451: Customizer: Introduce plugin management
-------------------------------------------------+-------------------------
 Reporter:  lukecavanagh                         |       Owner:
     Type:  feature request                      |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Customize                            |  Release
 Severity:  normal                               |     Version:  4.7.3
 Keywords:  needs-patch ux-feedback dev-         |  Resolution:
  feedback                                       |     Focuses:  ui
-------------------------------------------------+-------------------------
Changes (by celloexpressions):

 * priority:  low => normal


Comment:

 I was also initially uncertain about the usefulness of this. However,
 there are many good plugins that do one thing and do not require
 configuration beyond being activated - those plugins benefit significantly
 from live preview. And really, it should be a goal long-term to allow
 plugins to be fully live-previewed along with any other aspect of managing
 a site.

 > Each time that a plugin activation is toggled on, it would need to
 refresh the entire customizer (as is done for themes) so that any
 customizations can be done, as a plugin could be doing a lot of script
 enqueues and style enqueues as well as any other number of arbitrary
 templates getting printed to the page, and so on. It would not be reliable
 to just try to look at differences to which
 panels/sections/controls/settings are registered.

 For both plugins and themes, the long-term idea is that rather than
 reloading the customizer entirely, the customize controls pane can be
 selectively updated via an ajax call that essentially provides a diff
 between customize objects (and enqueued scripts/styles, by running the
 customize-specific hooks) that were available before and after the theme
 switch/plugin activation. Any added objects could be added and any removed
 ones removed via the JS API, and JS-templated controls particularly lend
 themselves to this approach (this is also the sort of behavior that #30741
 aims to eventually enable). Additional scripts and styles could also be
 loaded. The preview would be the only thing requiring a refresh. Plugins
 could potentially also opt-in to additional hooks to facilitate this
 behavior or prompt the user to do a full reload if absolutely necessary
 (this would likely be limited to plugins modifying the customizer itself).

 The 4.1-era thought was that this functionality was a prerequisite to
 customize-based theme switching; in 4.2 we implemented an intermediate
 approach that matinains the full page load for now. Eventually, that
 should be implemented for both themes and plugins, allowing full live
 previews without page loads.

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


More information about the wp-trac mailing list