Make WordPress Core


Ignore:
Timestamp:
03/27/2019 12:15:15 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Themes: Remove itemprop="url" from get_custom_logo() output.

Making incorrect assumptions about microdata used in a theme results in invalid markup.

The attribute can still be added using the get_custom_logo or wp_get_attachment_image_attributes filter, but it should not be added by default.

Props henry.wright, tfrommen, afercia, markcallen, zodiac1978.
Fixes #37305.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r44956 r45028  
    949949    if ( $custom_logo_id ) {
    950950        $custom_logo_attr = array(
    951             'class'    => 'custom-logo',
    952             'itemprop' => 'logo',
     951            'class' => 'custom-logo',
    953952        );
    954953
     
    967966         */
    968967        $html = sprintf(
    969             '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
     968            '<a href="%1$s" class="custom-logo-link" rel="home">%2$s</a>',
    970969            esc_url( home_url( '/' ) ),
    971970            wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )
Note: See TracChangeset for help on using the changeset viewer.