Ensure that an array of object IDs is passed to the 'get_object_terms' filter.

Originally introduced in [31581].

Props doublesharp.
Fixes #18828.
Built from https://develop.svn.wordpress.org/trunk@31639


git-svn-id: http://core.svn.wordpress.org/trunk@31620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-03-06 13:18:26 +00:00
parent 68bbc0e43d
commit 3acf36fe48
2 changed files with 8 additions and 7 deletions

View File

@ -2695,6 +2695,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
$order = 'ASC'; $order = 'ASC';
$taxonomy_array = $taxonomies; $taxonomy_array = $taxonomies;
$object_id_array = $object_ids;
$taxonomies = "'" . implode("', '", $taxonomies) . "'"; $taxonomies = "'" . implode("', '", $taxonomies) . "'";
$object_ids = implode(', ', $object_ids); $object_ids = implode(', ', $object_ids);
@ -2770,13 +2771,13 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
* *
* @since 4.2.0 * @since 4.2.0
* *
* @param array $terms An array of terms for the given object or objects. * @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 $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 $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). * @param array $args An array of arguments for retrieving terms for the given object(s).
* See {@see wp_get_object_terms()} for details. * 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. * Filter the terms for a given object or objects.

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31638'; $wp_version = '4.2-alpha-31639';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.