Add `get_terms_defaults` filter for the default arguments of `get_terms()`.
Fixes #33369. Built from https://develop.svn.wordpress.org/trunk@35322 git-svn-id: http://core.svn.wordpress.org/trunk@35288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d1dea6e6cf
commit
da157f16b1
|
@ -1095,7 +1095,17 @@ function get_terms( $taxonomies, $args = '' ) {
|
|||
'meta_query' => ''
|
||||
);
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
/**
|
||||
* Filter the terms query default arguments.
|
||||
*
|
||||
* Use 'get_terms_args' to filter the passed arguments.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $defaults An array of default get_terms() arguments.
|
||||
* @param array $taxonomies An array of taxonomies.
|
||||
*/
|
||||
$args = wp_parse_args( $args, apply_filters( 'get_terms_defaults', $defaults, $taxonomies ) );
|
||||
|
||||
$args['number'] = absint( $args['number'] );
|
||||
$args['offset'] = absint( $args['offset'] );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-35321';
|
||||
$wp_version = '4.4-alpha-35322';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue