WordPress.org

Make WordPress Core

Changeset 23937


Ignore:
Timestamp:
04/09/2013 01:42:53 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Consistently use the function argument instead of the $post global in get_the_post_format_media(). props kovshenin. fixes #24003.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23921 r23937  
    20462046    $count = 1;
    20472047
    2048     if ( has_post_format( $type ) ) {
     2048    if ( has_post_format( $type, $post ) ) {
    20492049        $meta = get_post_format_meta( $post->ID );
    20502050        if ( ! empty( $meta[$type] ) ) {
     
    21012101    }
    21022102
    2103     $medias = call_user_func( 'get_attached_' . $type );
     2103    $medias = call_user_func( 'get_attached_' . $type, $post->ID );
    21042104    if ( ! empty( $medias ) ) {
    21052105        $media = reset( $medias );
Note: See TracChangeset for help on using the changeset viewer.