#37222 closed enhancement (fixed)
Add better add_shortcode documentation
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | Shortcodes | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
When looking at the add_shortcode() documentation is it is not clear what $parameters
the the function $func
has.
Only by looking at do_shortcode_tag() can you see that there are three parameters $args
, $inline_content
and $shortcode_tag
Attachments (1)
Change History (11)
#1
@
9 years ago
A partial fix for this would be to improve the code example which uses all of the parameters.
This ticket was mentioned in Slack in #docs by morganestes. View the logs.
9 years ago
#4
@
9 years ago
- Keywords needs-docs added
It would also help to include some examples in the Code Reference page https://developer.wordpress.org/reference/functions/add_shortcode/. The inline docs will get parsed for the inline/canonical example, but can be expanded on in the examples on that page.
#6
@
8 years ago
- Owner set to DrewAPicture
- Resolution set to fixed
- Status changed from new to closed
In 41281:
Note: See
TracTickets for help on using
tickets.
Small improvement by updating the code example