Make WordPress Core


Ignore:
Timestamp:
10/21/2015 08:07:12 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Add get_terms_defaults filter for the default arguments of get_terms().

Fixes #33369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy-functions.php

    r35321 r35322  
    10961096    );
    10971097
    1098     $args = wp_parse_args( $args, $defaults );
     1098    /**
     1099     * Filter the terms query default arguments.
     1100     *
     1101     * Use 'get_terms_args' to filter the passed arguments.
     1102     *
     1103     * @since 4.4.0
     1104     *
     1105     * @param array $defaults   An array of default get_terms() arguments.
     1106     * @param array $taxonomies An array of taxonomies.
     1107     */
     1108    $args = wp_parse_args( $args, apply_filters( 'get_terms_defaults', $defaults, $taxonomies ) );
    10991109
    11001110    $args['number'] = absint( $args['number'] );
Note: See TracChangeset for help on using the changeset viewer.