#25661 closed defect (bug) (fixed)
Inline Docs: Document shortcode attribute arrays
Reported by: | johnbillion | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Shortcodes | Keywords: | has-patch |
Focuses: | docs | Cc: |
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
@
11 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
@
11 years ago
$output = ''
and $html = ''
should probably be moved above the docblocks.
#4
in reply to:
↑ 3
@
11 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
@
11 years ago
- Summary changed from Inline Docs: Array notation documentation for shortcode attributes to Inline Docs: Document shortcode attribute arrays
#9
@
11 years ago
- Milestone changed from Awaiting Review to 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.
Patch.