#25661 closed defect (bug) (fixed)
Inline Docs: Document shortcode attribute arrays
| Reported by: | johnbillion | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Shortcodes | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
The various shortcodes in core accept numerous attributes, but these aren't documented in the inline docs for the callback functions. Upcoming patch fixes that.
Attachments (2)
Change History (14)
#2
@
13 years ago
For those interested, my colleague Scott has written a plugin which adds autosuggest functionality for shortcodes. We're hoping to add support for the shortcode attributes too by reading the docblock, hence this patch.
#3
follow-up:
↓ 4
@
13 years ago
$output = '' and $html = '' should probably be moved above the docblocks.
#4
in reply to: ↑ 3
@
13 years ago
Replying to SergeyBiryukov:
$output = ''and$html = ''should probably be moved above the docblocks.
Actually, a couple of weeks ago we opted to take the approach of leaving the original value in the hook call and referencing a nonexistent variable in the phpdoc. So rather than creating a one-time variable, we'd just continue to pass '' and reference $html in the doc block.
#5
@
13 years ago
- Summary Inline Docs: Array notation documentation for shortcode attributes → Inline Docs: Document shortcode attribute arrays
#9
@
13 years ago
- Milestone Awaiting Review → 3.9
I'd like to get this in for 3.9 – I think it would certainly set a good example for documenting shortcodes going forward.25661.2.diff brings a few descriptions and tags up to standard, and tweaks a few other things.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch.