Opened 9 years ago
Closed 9 years ago
#39930 closed task (blessed) (fixed)
Adding documentation for wp.customize properties
| Reported by: | shramee | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Customize | Version: | 4.8 |
| Severity: | normal | Keywords: | has-patch needs-docs |
| Cc: | Focuses: | javascript, docs |
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.
9 years ago
#2
@
9 years ago
- Milestone Awaiting Review → 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
@
9 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.
9 years ago
#7
@
9 years ago
- Milestone 4.8 → 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.
9 years ago
#11
@
9 years ago
- Type enhancement → task (blessed)
As this is a documentation update, we'll switch this from an enhancement to a task ticket type.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch for docs