From 20fbd41ebebbcfb5a2c289c805fdedca9c1bbdfd Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 19 May 2016 02:16:36 +0000 Subject: [PATCH] Beautify, simplify, lovelify, alignify the default argument array in `wp_dropdown_categories()`. See #31909. git-svn-id: https://develop.svn.wordpress.org/trunk@37463 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 31 +++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 35d6c82ed0..fbf9b9326e 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -356,17 +356,26 @@ function category_description( $category = 0 ) { */ function wp_dropdown_categories( $args = '' ) { $defaults = array( - 'show_option_all' => '', 'show_option_none' => '', - 'orderby' => 'id', 'order' => 'ASC', - 'show_count' => 0, - 'hide_empty' => 1, 'child_of' => 0, - 'exclude' => '', 'echo' => 1, - 'selected' => 0, 'hierarchical' => 0, - 'name' => 'cat', 'id' => '', - 'class' => 'postform', 'depth' => 0, - 'tab_index' => 0, 'taxonomy' => 'category', - 'hide_if_empty' => false, 'option_none_value' => -1, - 'value_field' => 'term_id', + 'show_option_all' => '', + 'show_option_none' => '', + 'orderby' => 'id', + 'order' => 'ASC', + 'show_count' => 0, + 'hide_empty' => 1, + 'child_of' => 0, + 'exclude' => '', + 'echo' => 1, + 'selected' => 0, + 'hierarchical' => 0, + 'name' => 'cat', + 'id' => '', + 'class' => 'postform', + 'depth' => 0, + 'tab_index' => 0, + 'taxonomy' => 'category', + 'hide_if_empty' => false, + 'option_none_value' => -1, + 'value_field' => 'term_id', ); $defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;