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:
parent
117cef2d46
commit
805a1ebadb
|
@ -356,17 +356,26 @@ function category_description( $category = 0 ) {
|
||||||
*/
|
*/
|
||||||
function wp_dropdown_categories( $args = '' ) {
|
function wp_dropdown_categories( $args = '' ) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'show_option_all' => '', 'show_option_none' => '',
|
'show_option_all' => '',
|
||||||
'orderby' => 'id', 'order' => 'ASC',
|
'show_option_none' => '',
|
||||||
'show_count' => 0,
|
'orderby' => 'id',
|
||||||
'hide_empty' => 1, 'child_of' => 0,
|
'order' => 'ASC',
|
||||||
'exclude' => '', 'echo' => 1,
|
'show_count' => 0,
|
||||||
'selected' => 0, 'hierarchical' => 0,
|
'hide_empty' => 1,
|
||||||
'name' => 'cat', 'id' => '',
|
'child_of' => 0,
|
||||||
'class' => 'postform', 'depth' => 0,
|
'exclude' => '',
|
||||||
'tab_index' => 0, 'taxonomy' => 'category',
|
'echo' => 1,
|
||||||
'hide_if_empty' => false, 'option_none_value' => -1,
|
'selected' => 0,
|
||||||
'value_field' => 'term_id',
|
'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;
|
$defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue