#37222 closed enhancement (fixed)
Add better add_shortcode documentation
| Reported by: | grapplerulrich | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Shortcodes | Version: | 2.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
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
@
10 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.
10 years ago
#4
@
10 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Small improvement by updating the code example