mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@40994 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1882,6 +1882,18 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||
|
||||
$args = wp_parse_args( $args );
|
||||
|
||||
/**
|
||||
* Filter arguments for retrieving object terms.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param array $args An array of arguments for retrieving terms for the given object(s).
|
||||
* See {@see wp_get_object_terms()} for details.
|
||||
* @param int|array $object_ids Object ID or array of IDs.
|
||||
* @param string|array $taxonomies The taxonomies to retrieve terms from.
|
||||
*/
|
||||
$args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );
|
||||
|
||||
/*
|
||||
* When one or more queried taxonomies is registered with an 'args' array,
|
||||
* those params override the `$args` passed to this function.
|
||||
|
||||
Reference in New Issue
Block a user