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

See #22400.


git-svn-id: https://develop.svn.wordpress.org/trunk@28413 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-15 03:27:17 +00:00
parent 9d873771b7
commit e9f929443f
1 changed files with 3 additions and 3 deletions

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>