From ef53a0db3964e249976ec4963611a691890c6349 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 30 Mar 2016 17:19:41 +0000 Subject: [PATCH] Template: Remove `$size` reference from `get_custom_logo()`. Argument was removed in [37077] in favor of `with` and `height` arguments. Props ocean90. Fixes #36327. git-svn-id: https://develop.svn.wordpress.org/trunk@37135 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 20 ++++++-------------- tests/phpunit/tests/general/template.php | 14 ++++---------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 2ba72a38f3..aaff39ef20 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -876,29 +876,22 @@ function get_custom_logo( $blog_id = 0 ) { } $custom_logo_id = get_theme_mod( 'custom_logo' ); - $size = get_theme_support( 'custom-logo', 'size' ); - - if ( ! $size ) { - $size = 'full'; - } // We have a logo. Logo is go. if ( $custom_logo_id ) { $html = sprintf( '', esc_url( home_url( '/' ) ), - wp_get_attachment_image( $custom_logo_id, $size, false, array( - 'class' => "custom-logo attachment-$size", - 'data-size' => $size, - 'itemprop' => 'logo', + wp_get_attachment_image( $custom_logo_id, 'full', false, array( + 'class' => 'custom-logo', + 'itemprop' => 'logo', ) ) ); } // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). elseif ( is_customize_preview() ) { - $html = sprintf( '', - esc_url( home_url( '/' ) ), - esc_attr( $size ) + $html = sprintf( '', + esc_url( home_url( '/' ) ) ); } @@ -912,9 +905,8 @@ function get_custom_logo( $blog_id = 0 ) { * @since 4.5.0 * * @param string $html Custom logo HTML output. - * @param string $size Size specified in add_theme_support declaration, or 'full' default. */ - return apply_filters( 'get_custom_logo', $html, $size ); + return apply_filters( 'get_custom_logo', $html ); } /** diff --git a/tests/phpunit/tests/general/template.php b/tests/phpunit/tests/general/template.php index 2c9a0b9861..5d4b92135f 100644 --- a/tests/phpunit/tests/general/template.php +++ b/tests/phpunit/tests/general/template.php @@ -279,11 +279,8 @@ class Tests_General_Template extends WP_UnitTestCase { $this->_set_custom_logo(); $home_url = get_home_url( $blog_id, '/' ); - $size = get_theme_support( 'custom-logo', 'size' ); - $size = $size ? $size : 'full'; - $image = wp_get_attachment_image( $this->custom_logo_id, $size, false, array( - 'class' => "custom-logo attachment-$size", - 'data-size' => $size, + $image = wp_get_attachment_image( $this->custom_logo_id, 'full', false, array( + 'class' => 'custom-logo', 'itemprop' => 'logo', ) ); restore_current_blog(); @@ -302,11 +299,8 @@ class Tests_General_Template extends WP_UnitTestCase { the_custom_logo(); $this->_set_custom_logo(); - $size = get_theme_support( 'custom-logo', 'size' ); - $size = $size ? $size : 'full'; - $image = wp_get_attachment_image( $this->custom_logo_id, $size, false, array( - 'class' => "custom-logo attachment-$size", - 'data-size' => $size, + $image = wp_get_attachment_image( $this->custom_logo_id, 'full', false, array( + 'class' => 'custom-logo', 'itemprop' => 'logo', ) );