Make WordPress Core

Ticket #24162: 24162.2.diff

File 24162.2.diff, 802 bytes (added by SergeyBiryukov, 12 years ago)
  • wp-includes/post-formats.php

     
    8181 * @return array The array of post format metadata.
    8282 */
    8383function get_post_format_meta( $post_id = 0 ) {
     84        if ( ! $post = get_post( $post_id ) )
     85                return array();
     86
     87        $post_id = $post->ID;
    8488        $meta = get_post_meta( $post_id );
    8589        $keys = array( 'quote', 'quote_source_name', 'quote_source_url', 'link_url', 'gallery', 'audio_embed', 'video_embed', 'url', 'image' );
    8690
     
    120124                $values[$key] = empty( $value ) ? '' : $value;
    121125        }
    122126
    123         return apply_filters( 'post_format_meta', $values );
     127        return apply_filters( 'post_format_meta', $values, $post_id );
    124128}
    125129
    126130/**