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.
Built from https://develop.svn.wordpress.org/trunk@45028


git-svn-id: http://core.svn.wordpress.org/trunk@44837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-27 12:16:53 +00:00
parent 6e2fb402e1
commit d4d906c4d5
2 changed files with 3 additions and 4 deletions

View File

@ -948,8 +948,7 @@ function get_custom_logo( $blog_id = 0 ) {
// We have a logo. Logo is go.
if ( $custom_logo_id ) {
$custom_logo_attr = array(
'class' => 'custom-logo',
'itemprop' => 'logo',
'class' => 'custom-logo',
);
/*
@ -966,7 +965,7 @@ function get_custom_logo( $blog_id = 0 ) {
* it because wp_get_attachment_image() already adds the alt attribute.
*/
$html = sprintf(
'<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
'<a href="%1$s" class="custom-logo-link" rel="home">%2$s</a>',
esc_url( home_url( '/' ) ),
wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )
);

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-45027';
$wp_version = '5.2-alpha-45028';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.