[wp-trac] [WordPress Trac] #37335: Standardized API for themes to add info/links to the customizer

WordPress Trac noreply at wordpress.org
Sat Sep 3 03:43:56 UTC 2016


#37335: Standardized API for themes to add info/links to the customizer
------------------------------+------------------------------
 Reporter:  celloexpressions  |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Customize         |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  ui
------------------------------+------------------------------

Comment (by celloexpressions):

 @FolioVision that's more on the theme review team side of things, but I
 imagine that there will eventually be a requirement to use the approach
 that we come up with here or to put UI within a section.

 @westonruter more than JS, I'd say that custom controls/sections/panels
 and generally the PHP and JS APIs should be used to extend the customizer
 UI. Right now most themes that add promotional links are bypassing the API
 entirely and injecting content into the DOM with arbitrary JS, into core-
 defined UI elements such as the global header (implying that they're
 taking their site "Pro" by buying a custom theme, and in a way implying
 that they're getting a "pro" version of WordPress). An `action` would be a
 stopgap solution to provide a simple route that complies with core-
 recommended UI practices, and is the only good way I can think of to
 facilitate adding UI to a core section heading that should not be
 overridden by a custom instance. The other way is creating a custom
 section (which could display only a top level link and not expand), but
 that would introduce more UI for end users and more complexity for devs
 than being able to add a link via this action.

 If you ask me, theme shouldn't be allowed to alter the top-level UI in any
 way, especially not with external links, but the theme review team decided
 to allow this so we need to make sure that it's possible to do in a
 reasonably elegant way that won't break things.

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


More information about the wp-trac mailing list