Beautify, simplify, lovelify, alignify the default argument array in `wp_dropdown_categories()`.

See #31909.
Built from https://develop.svn.wordpress.org/trunk@37463


git-svn-id: http://core.svn.wordpress.org/trunk@37431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-05-19 02:17:27 +00:00
parent 117cef2d46
commit 805a1ebadb
2 changed files with 21 additions and 12 deletions

View File

@ -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;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37462';
$wp_version = '4.6-alpha-37463';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.