Opened 8 years ago
Closed 7 years ago
#39930 closed task (blessed) (fixed)
Adding documentation for wp.customize properties
Reported by: | shramee | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Customize | Keywords: | has-patch needs-docs |
Focuses: | javascript, docs | Cc: |
Description
Adding documentation for...
- wp.customize.control
- wp.customize.section
- wp.customize.panel
Along with examples for usage.
Attachments (2)
Change History (16)
This ticket was mentioned in Slack in #docs by shramee. View the logs.
8 years ago
#2
@
8 years ago
- Milestone changed from Awaiting Review to 4.8
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:
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.
#5
@
8 years ago
@westonruter Thanks a lot, I am using this in one of my plugin (will be live on wp.org soon).
Passing a deferred (anonymous) function would make my plugin more robust :)
PFA 39930-1.patch
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
8 years ago
#7
@
8 years ago
- Milestone changed from 4.8 to 4.8.1
Per yesterday's bug scrub, we're going to punt this to 4.8.1.
This ticket was mentioned in Slack in #core-customize by jeffpaul. View the logs.
7 years ago
#11
@
7 years ago
- Type changed from enhancement to task (blessed)
As this is a documentation update, we'll switch this from an enhancement to a task ticket type.
Patch for docs