From 98322a7143835a5f1baf28f7044858b165ca479f Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 6 Mar 2015 13:17:09 +0000 Subject: [PATCH] Ensure that an array of object IDs is passed to the 'get_object_terms' filter. Originally introduced in [31581]. Props doublesharp. Fixes #18828. git-svn-id: https://develop.svn.wordpress.org/trunk@31639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index b0643a59fb..3659627fab 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2695,6 +2695,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { $order = 'ASC'; $taxonomy_array = $taxonomies; + $object_id_array = $object_ids; $taxonomies = "'" . implode("', '", $taxonomies) . "'"; $object_ids = implode(', ', $object_ids); @@ -2770,13 +2771,13 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { * * @since 4.2.0 * - * @param array $terms An array of terms for the given object or objects. - * @param int|array $object_ids Object ID or array of IDs. - * @param array $taxonomy_array Array of taxonomies from which `$terms` were retrieved. - * @param array $args An array of arguments for retrieving terms for the given object(s). - * See {@see wp_get_object_terms()} for details. + * @param array $terms An array of terms for the given object or objects. + * @param array $object_id_array Array of object IDs for which `$terms` were retrieved. + * @param array $taxonomy_array Array of taxonomies from which `$terms` were retrieved. + * @param array $args An array of arguments for retrieving terms for the given object(s). + * See {@see wp_get_object_terms()} for details. */ - $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomy_array, $args ); + $terms = apply_filters( 'get_object_terms', $terms, $object_id_array, $taxonomy_array, $args ); /** * Filter the terms for a given object or objects.