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