[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 29 02:21:36 UTC 2012


#19910: Appearance Improvements: Theme Customization Frame
----------------------------+--------------------------
 Reporter:  koopersmith     |       Owner:  koopersmith
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  3.4
Component:  Themes          |     Version:  3.3.1
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+--------------------------

Comment (by koopersmith):

 Replying to [comment:17 Myatu]:
 > Looking at how sections and settings are added in the `WP_Customize`
 class, wouldn't there be a benefit to add a filter to `add_setting` and
 `add_section`. This provides ample opportunity to filter (modify) the
 respective setting or sections, without having to resort to a later
 `remove_setting`?

 Settings and sections are objects for just that reason — so that they can
 be modified without having to be entirely replaced. That said, the
 `add_setting` and `add_section` methods aren't set in stone yet. We'll be
 moving away from a strict `$customize` global in favor of dependency
 injection. I'm not convinced that we'll need a filter there, but let's
 revisit the idea once things settle a bit.

 Replying to [comment:17 Myatu]:
 > And this simply nitpicking: Sections and settings are rendered in the
 order it is saved in their respective arrays (in `WP_Customize`).

 Settings and sections both contain `priority` parameters (you can specify
 these in the constructor or alter them afterwards) which serve as the
 primary means of sorting sections before they're rendered. The order
 settings/sections are added serves as a secondary sorting mechanism
 (tiebreaker) when multiple items share the same priority.

 Thanks for the feedback!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19910#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list