Reorder default arguments in `get_terms()` for consistency with the hash notation added in [29128].
See #33369. git-svn-id: https://develop.svn.wordpress.org/trunk@35321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7b81e1e56c
commit
f3f2a222b9
|
@ -1069,13 +1069,34 @@ function get_terms( $taxonomies, $args = '' ) {
|
|||
}
|
||||
}
|
||||
|
||||
$defaults = array('orderby' => 'name', 'order' => 'ASC',
|
||||
'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),
|
||||
'number' => '', 'fields' => 'all', 'name' => '', 'slug' => '', 'parent' => '', 'childless' => false,
|
||||
'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', 'description__like' => '',
|
||||
'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core',
|
||||
'update_term_meta_cache' => true, 'meta_query' => '' );
|
||||
$defaults = array(
|
||||
'orderby' => 'name',
|
||||
'order' => 'ASC',
|
||||
'hide_empty' => true,
|
||||
'include' => array(),
|
||||
'exclude' => array(),
|
||||
'exclude_tree' => array(),
|
||||
'number' => '',
|
||||
'offset' => '',
|
||||
'fields' => 'all',
|
||||
'name' => '',
|
||||
'slug' => '',
|
||||
'hierarchical' => true,
|
||||
'search' => '',
|
||||
'name__like' => '',
|
||||
'description__like' => '',
|
||||
'pad_counts' => false,
|
||||
'get' => '',
|
||||
'child_of' => 0,
|
||||
'parent' => '',
|
||||
'childless' => false,
|
||||
'cache_domain' => 'core',
|
||||
'update_term_meta_cache' => true,
|
||||
'meta_query' => ''
|
||||
);
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
$args['number'] = absint( $args['number'] );
|
||||
$args['offset'] = absint( $args['offset'] );
|
||||
|
||||
|
|
Loading…
Reference in New Issue