Make WordPress Core


Ignore:
Timestamp:
07/02/2017 06:28:21 PM (9 years ago)
Author:
boonebgorges
Message:

Introduce wp_get_object_terms_args filter.

This filter allows developers to modify the arguments passed to
wp_get_object_terms() before the query is run.

Props enrico.sorcinelli.
Fixes #35925.

File:
1 edited

Legend:

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

    r40984 r40994  
    18831883    $args = wp_parse_args( $args );
    18841884
     1885    /**
     1886     * Filter arguments for retrieving object terms.
     1887     *
     1888     * @since 4.9.0
     1889     *
     1890     * @param array        $args       An array of arguments for retrieving terms for the given object(s).
     1891     *                                 See {@see wp_get_object_terms()} for details.
     1892     * @param int|array    $object_ids Object ID or array of IDs.
     1893     * @param string|array $taxonomies The taxonomies to retrieve terms from.
     1894     */
     1895    $args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );
     1896
    18851897    /*
    18861898     * When one or more queried taxonomies is registered with an 'args' array,
Note: See TracChangeset for help on using the changeset viewer.