Make WordPress Core

Ticket #24270: 24270.4.diff

File 24270.4.diff, 1.9 KB (added by ocean90, 13 years ago)
  • wp-includes/media.php

     
    20602060 * @since 3.6.0
    20612061 *
    20622062 * @param string $content A string which might contain image data.
    2063  * @param boolean $html Whether to return HTML or URLs
     2063 * @param boolean $html Whether to return HTML or URLs in the array
    20642064 * @param int $limit Optional. The number of image srcs to return
    20652065 * @return array The found images or srcs
    20662066 */
     
    21452145 * @since 3.6.0
    21462146 *
    21472147 * @param string $content A string which might contain image data.
    2148  * @param boolean $html Whether to return HTML or data
     2148 * @param boolean $html Whether to return HTML or data in the array
    21492149 * @param int $limit Optional. The number of galleries to return
    21502150 * @return array A list of galleries, which in turn are a list of their srcs in order
    21512151 */
     
    21882188 * @since 3.6.0
    21892189 *
    21902190 * @param int $post_id Optional. Post ID.
    2191  * @param boolean $html Whether to return HTML or data
     2191 * @param boolean $html Whether to return HTML or data in the array
    21922192 * @return array A list of arrays, each containing gallery data and srcs parsed
    21932193 *              from the expanded shortcode
    21942194 */
     
    22292229 *
    22302230 * @param int $post_id Optional. Post ID.
    22312231 * @param boolean $html Whether to return HTML or data
    2232  * @return array Gallery data and srcs parsed from the expanded shortcode
     2232 * @return string|array Gallery data and srcs parsed from the expanded shortcode
    22332233 */
    22342234function get_post_gallery( $post_id = 0, $html = true ) {
    22352235        if ( ! $post = get_post( $post_id ) )
    2236                 return array();
     2236                return $html ? '' : array();
    22372237
    22382238        if ( ! has_shortcode( $post->post_content, 'gallery' ) )
    2239                 return array();
     2239                return $html ? '' : array();
    22402240
    22412241        $data = get_content_galleries( $post->post_content, $html, false, 1 );
    22422242        return reset( $data );