Make WordPress Core

Ticket #18828: 18828.3.diff

File 18828.3.diff, 2.2 KB (added by boonebgorges, 10 years ago)
  • src/wp-includes/taxonomy.php

    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()) { 
    26932693        if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) )
    26942694                $order = 'ASC';
    26952695
     2696        $taxonomy_array = $taxonomies;
    26962697        $taxonomies = "'" . implode("', '", $taxonomies) . "'";
    26972698        $object_ids = implode(', ', $object_ids);
    26982699
    function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { 
    27622763        } elseif ( ! $objects ) {
    27632764                $terms = array_values( array_unique( $terms ) );
    27642765        }
     2766
    27652767        /**
    27662768         * Filter the terms for a given object or objects.
    27672769         *
     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         *
    27682785         * @since 2.8.0
    27692786         *
    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).
    27752791         */
    27762792        return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
    27772793}