WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/20/2016 05:34:13 PM (3 years ago)
Author:
boonebgorges
Message:

Allow attachment taxonomies to be fetched as objects.

By adding the $output parameter to get_attachment_taxonomies(), the
function signature matches that of get_object_taxonomies(). The change
also allows for more consistent behavior when passing output=objects
to get_object_taxonomies() for the 'attachment' object type, since
the $output parameter is now passed through the function stack.

Props codemovement.pk.
See #37368.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r38277 r38292  
    182182    if ( is_object($object) ) {
    183183        if ( $object->post_type == 'attachment' )
    184             return get_attachment_taxonomies($object);
     184            return get_attachment_taxonomies( $object, $output );
    185185        $object = $object->post_type;
    186186    }
Note: See TracChangeset for help on using the changeset viewer.