WordPress.org

Make WordPress Core

Ticket #11846: media.php.diff

File media.php.diff, 553 bytes (added by kallewangstedt, 8 years ago)

Patch for wp_get_attachment_image()

  • wp-includes/media.php

     
    561561                $default_attr = array(
    562562                        'src'   => $src,
    563563                        'class' => "attachment-$size",
    564                         'alt'   => trim(strip_tags( $attachment->post_excerpt )),
     564                        'alt'   => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )),
    565565                        'title' => trim(strip_tags( $attachment->post_title )),
    566566                );
    567567                $attr = wp_parse_args($attr, $default_attr);