From 7793a90fd1c2cb7a4f9e800a2c23447c2df1c4b5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 15 May 2014 17:27:18 +0000 Subject: [PATCH] Eliminate use of `extract()` in `wp_list_categories()`. See #22400. git-svn-id: https://develop.svn.wordpress.org/trunk@28434 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 48 +++++++++++++++------------ 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index ff8fb895da..621761efb3 100644 --- a/src/wp-includes/category-template.php +++ b/src/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 . '