diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index ae207d2715..837770f519 100644
--- a/src/wp-includes/general-template.php
+++ b/src/wp-includes/general-template.php
@@ -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(
- '%2$s',
+ '%2$s',
esc_url( home_url( '/' ) ),
wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )
);
diff --git a/tests/phpunit/tests/general/template.php b/tests/phpunit/tests/general/template.php
index 8e0567c82e..daa77da5b9 100644
--- a/tests/phpunit/tests/general/template.php
+++ b/tests/phpunit/tests/general/template.php
@@ -308,8 +308,7 @@ class Tests_General_Template extends WP_UnitTestCase {
$this->_set_custom_logo();
$custom_logo_attr = array(
- 'class' => 'custom-logo',
- 'itemprop' => 'logo',
+ 'class' => 'custom-logo',
);
// If the logo alt attribute is empty, use the site title.
@@ -322,7 +321,7 @@ class Tests_General_Template extends WP_UnitTestCase {
$image = wp_get_attachment_image( $this->custom_logo_id, 'full', false, $custom_logo_attr );
restore_current_blog();
- $expected_custom_logo = '' . $image . '';
+ $expected_custom_logo = '' . $image . '';
$this->assertEquals( $expected_custom_logo, get_custom_logo( $blog_id ) );
}
@@ -338,8 +337,7 @@ class Tests_General_Template extends WP_UnitTestCase {
$this->_set_custom_logo();
$custom_logo_attr = array(
- 'class' => 'custom-logo',
- 'itemprop' => 'logo',
+ 'class' => 'custom-logo',
);
// If the logo alt attribute is empty, use the site title.
@@ -350,7 +348,7 @@ class Tests_General_Template extends WP_UnitTestCase {
$image = wp_get_attachment_image( $this->custom_logo_id, 'full', false, $custom_logo_attr );
- $this->expectOutputString( '' . $image . '' );
+ $this->expectOutputString( '' . $image . '' );
the_custom_logo();
}
@@ -370,12 +368,11 @@ class Tests_General_Template extends WP_UnitTestCase {
'full',
false,
array(
- 'class' => 'custom-logo',
- 'itemprop' => 'logo',
+ 'class' => 'custom-logo',
)
);
- $this->expectOutputString( '' . $image . '' );
+ $this->expectOutputString( '' . $image . '' );
the_custom_logo();
}