[wp-trac] [WordPress Trac] #39930: Adding documentation for wp.customize properties
WordPress Trac
noreply at wordpress.org
Tue Feb 21 19:35:39 UTC 2017
#39930: Adding documentation for wp.customize properties
-------------------------+--------------------
Reporter: shramee | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+--------------------
Changes (by westonruter):
* milestone: Awaiting Review => 4.8
Comment:
Thanks. I wouldn't mention `_values` as it is private. The items in the
collection should only be accessed via the methods on `Values` like
`each()`.
Also, instead of `@return {object|undefined}` these should have `@returns
{wp.customize.Section|undefined}` according to the various types.
Also a key example to include is how to use the deferred pattern, for
example:
{{{#!js
wp.customize.section( 'title_tagline', function( section ) {
section.expand(); } )
}}}
The deferred pattern is preferred since it ensures there is no JS error in
the case of something not being registered.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39930#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list