From 9c8becc1f7cecfc65e10a7a1fcf09afd84629394 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 15 May 2014 17:28:14 +0000 Subject: [PATCH] Eliminate use of `extract()` in `wp_list_categories()`. See #22400. Built from https://develop.svn.wordpress.org/trunk@28434 git-svn-id: http://core.svn.wordpress.org/trunk@28261 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 48 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ff8fb895da..621761efb3 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -485,52 +485,57 @@ function wp_list_categories( $args = '' ) { $r['exclude'] = ''; } - if ( !isset( $r['class'] ) ) + if ( ! isset( $r['class'] ) ) $r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy']; - extract( $r ); - - if ( !taxonomy_exists($taxonomy) ) + if ( ! taxonomy_exists( $r['taxonomy'] ) ) { return false; + } + + $show_option_all = $r['show_option_all']; + $show_option_none = $r['show_option_none']; $categories = get_categories( $r ); $output = ''; - if ( $title_li && 'list' == $style ) - $output = '
  • ' . $title_li . '