Make WordPress Core

Ticket #30180: 30180.patch

File 30180.patch, 632 bytes (added by joedolson, 10 years ago)

Adds image alt and meta data to array output

  • wp-includes/media.php

     
    668668                $src_file = $icon_dir . '/' . wp_basename($src);
    669669                @list($width, $height) = getimagesize($src_file);
    670670        }
     671       
     672        $image_meta = wp_get_attachment_metadata( $attachment_id );
     673        $image_alt  = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
     674       
    671675        if ( $src && $width && $height )
    672                 return array( $src, $width, $height );
     676                return array( $src, $width, $height, $image_alt, $image_meta );
    673677        return false;
    674678}
    675679