Update the inline docs for add_shortcode() to eliminate suggestion to use extract().

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28413


git-svn-id: http://core.svn.wordpress.org/trunk@28240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-05-15 03:28:15 +00:00
parent 4b94efd93b
commit 947aa04900

View File

@ -65,12 +65,12 @@ $shortcode_tags = array();
* <code>
* // [bartag foo="bar"]
* function bartag_func($atts) {
* extract(shortcode_atts(array(
* $args = shortcode_atts(array(
* 'foo' => 'no foo',
* 'baz' => 'default baz',
* ), $atts));
* ), $atts);
*
* return "foo = {$foo}";
* return "foo = {$args['foo']}";
* }
* add_shortcode('bartag', 'bartag_func');
* </code>