From 6e8e30bb1ef57b692cef439597b5ebfd01b645cd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 15 May 2014 19:42:13 +0000 Subject: [PATCH] Eliminate use of `extract()` in `wp_widget_rss_output()`. Add `'items' => 0` to `$default_args`. When `0`, the value is set to `10` (the fallback). Every other default arg has a default value of `0`. `items` is expected to always be passed to this function. See #22400. Built from https://develop.svn.wordpress.org/trunk@28440 git-svn-id: http://core.svn.wordpress.org/trunk@28267 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-widgets.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index aaa9356fdb..dc8481305d 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -1016,16 +1016,15 @@ function wp_widget_rss_output( $rss, $args = array() ) { return; } - $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 ); + $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0, 'items' => 0 ); $args = wp_parse_args( $args, $default_args ); - extract( $args, EXTR_SKIP ); - $items = (int) $items; + $items = (int) $args['items']; if ( $items < 1 || 20 < $items ) $items = 10; - $show_summary = (int) $show_summary; - $show_author = (int) $show_author; - $show_date = (int) $show_date; + $show_summary = (int) $args['show_summary']; + $show_author = (int) $args['show_author']; + $show_date = (int) $args['show_date']; if ( !$rss->get_item_quantity() ) { echo '';