Make WordPress Core

Ticket #46124: 46124.4.patch

File 46124.4.patch, 862 bytes (added by sabernhardt, 3 years ago)
  • src/wp-includes/theme.php

     
    11941194        $width  = absint( $header->width );
    11951195        $height = absint( $header->height );
    11961196
     1197        // Use alternative text assigned to the image, if available. Otherwise, leave it empty.
     1198        if ( ! empty( $header->attachment_id ) && is_string( get_post_meta( $header->attachment_id, '_wp_attachment_image_alt', true ) ) ) {
     1199                $alt = get_post_meta( $header->attachment_id, '_wp_attachment_image_alt', true );
     1200        } else {
     1201                $alt = '';
     1202        }
     1203
    11971204        $attr = wp_parse_args(
    11981205                $attr,
    11991206                array(
     
    12001207                        'src'    => $header->url,
    12011208                        'width'  => $width,
    12021209                        'height' => $height,
    1203                         'alt'    => get_bloginfo( 'name' ),
     1210                        'alt'    => $alt,
    12041211                )
    12051212        );
    12061213