Make WordPress Core


Ignore:
Timestamp:
05/24/2013 11:56:00 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Add @return for get_the_post_format_image(). Make sure the function always returns a string. props tollmanz. fixes #24414. see #24348.

File:
1 edited

Legend:

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

    r24334 r24352  
    20492049 * @param WP_Post $post Optional. Used instead of global $post when passed.
    20502050 * @param int $limit Optional. The number of medias to remove if content is scanned.
    2051  * @return string
     2051 * @return string HTML for the media. Blank string if no media is found.
    20522052 */
    20532053function get_the_post_format_media( $type, &$post = null, $limit = 0 ) {
     
    24212421 * @param string $attached_size If an attached image is found, the size to display it.
    24222422 * @param WP_Post $post Optional. Used instead of global $post when passed.
     2423 * @return string HTML for the image. Blank string if no image is found.
    24232424 */
    24242425function get_the_post_format_image( $attached_size = 'full', &$post = null ) {
     
    25672568        return $post->format_content[ $cache_key ];
    25682569    }
     2570
     2571    return '';
    25692572}
    25702573
Note: See TracChangeset for help on using the changeset viewer.