diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
index 0c7c0f0..ebd7521 100644
|
|
function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { |
2693 | 2693 | if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) ) |
2694 | 2694 | $order = 'ASC'; |
2695 | 2695 | |
| 2696 | $taxonomy_array = $taxonomies; |
2696 | 2697 | $taxonomies = "'" . implode("', '", $taxonomies) . "'"; |
2697 | 2698 | $object_ids = implode(', ', $object_ids); |
2698 | 2699 | |
… |
… |
function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { |
2762 | 2763 | } elseif ( ! $objects ) { |
2763 | 2764 | $terms = array_values( array_unique( $terms ) ); |
2764 | 2765 | } |
| 2766 | |
2765 | 2767 | /** |
2766 | 2768 | * Filter the terms for a given object or objects. |
2767 | 2769 | * |
| 2770 | * @since 4.2.0 |
| 2771 | * |
| 2772 | * @param array $terms An array of terms for the given object or objects. |
| 2773 | * @param array|int $object_ids Object ID or array of IDs. |
| 2774 | * @param array $taxonomy_array Taxonomies matched. |
| 2775 | * @param array $args An array of arguments for retrieving terms for the given object(s). |
| 2776 | */ |
| 2777 | $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomy_array, $args ); |
| 2778 | |
| 2779 | /** |
| 2780 | * Filter the terms for a given object or objects. |
| 2781 | * |
| 2782 | * The `$taxonomies` parameter passed to this filter is formatted as a SQL fragment. The `'get_object_terms'` |
| 2783 | * filter is recommended as an alternative. |
| 2784 | * |
2768 | 2785 | * @since 2.8.0 |
2769 | 2786 | * |
2770 | | * @param array $terms An array of terms for the given object or objects. |
2771 | | * @param array|int $object_ids Object ID or array of IDs. |
2772 | | * @param array|string $taxonomies A taxonomy or array of taxonomies. |
2773 | | * @param array $args An array of arguments for retrieving terms for |
2774 | | * the given object(s). |
| 2787 | * @param array $terms An array of terms for the given object or objects. |
| 2788 | * @param array|int $object_ids Object ID or array of IDs. |
| 2789 | * @param string $taxonomies SQL-formatted (comma-separated and quoted) list of taxonomy names. |
| 2790 | * @param array $args An array of arguments for retrieving terms for the given object(s). |
2775 | 2791 | */ |
2776 | 2792 | return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args ); |
2777 | 2793 | } |