From e9f929443fc3e1d597b2457b82dc7c43c5657604 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 15 May 2014 03:27:17 +0000 Subject: [PATCH] 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 --- src/wp-includes/shortcodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 15f8561d5b..47cb57a9b2 100644 --- a/src/wp-includes/shortcodes.php +++ b/src/wp-includes/shortcodes.php @@ -65,12 +65,12 @@ $shortcode_tags = array(); * * // [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'); *