Make WordPress Core

Changeset 51541


Ignore:
Timestamp:
08/04/2021 02:22:37 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Bundled Themes: Add / character to <img> tags.

While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.

Follow-up to [47493], [48834], [50556], [51473].

Props shital-patel, akabarikalpesh.
See #53870.

Location:
trunk/src/wp-content/themes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r48290 r51541  
    3737    <div id="site-header">
    3838        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    39             <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
     39            <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    4040        </a>
    4141    </div>
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r48782 r51541  
    145145    <div id="headimg">
    146146        <?php if ( get_header_image() ) : ?>
    147         <img src="<?php header_image(); ?>" alt="">
     147        <img src="<?php header_image(); ?>" alt="" />
    148148        <?php endif; ?>
    149149        <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
  • trunk/src/wp-content/themes/twentysixteen/header.php

    r48782 r51541  
    9898                <div class="header-image">
    9999                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    100                         <img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
     100                        <img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    101101                    </a>
    102102                </div><!-- .header-image -->
Note: See TracChangeset for help on using the changeset viewer.