[wp-trac] [WordPress Trac] #20659: Document available shortcodes in eg. new post page
WordPress Trac
wp-trac at lists.automattic.com
Fri May 11 14:40:29 UTC 2012
#20659: Document available shortcodes in eg. new post page
-----------------------------+-----------------------------
Reporter: voxpelli | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version:
Severity: normal | Keywords:
-----------------------------+-----------------------------
It would be useful if a plugin defining shortcodes also could describe the
usecase for the shortcode and the available attributes and the usecases
for those attributes in a way that could be exposed in the interface on
eg. the new post page.
One could take inspiration from eg. the Drupal Token module which has a
token_list() hook that a Drupal module uses to describe every token it
describes so that they can be presented to the user in the interface.
Something like:
{{{
add_shortcode_description('shortcodename')
}}}
That returns something like this would be nice:
{{{
array(
'description' => 'This is used to do foo',
'attr' => array(
'bar' => 'A text that will be presented as bar'
),
);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20659>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list