Themes: Fix attachment rendered as site logo on attachment page.
Fix issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set. Avoid calling `wp_attachment_is_image()` with no value, since that function will fallback to the global `$post` variable. Follow up to [58213]. See #60922. Props greenshady, krupajnanda, hmbashar, rajinsharwar, joedolson. Fixes #61408. Built from https://develop.svn.wordpress.org/trunk@58407 git-svn-id: http://core.svn.wordpress.org/trunk@57856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b91147c35
commit
4c5baa2f21
|
@ -1035,7 +1035,7 @@ function has_custom_logo( $blog_id = 0 ) {
|
|||
}
|
||||
|
||||
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
||||
$is_image = wp_attachment_is_image( $custom_logo_id );
|
||||
$is_image = ( $custom_logo_id ) ? wp_attachment_is_image( $custom_logo_id ) : false;
|
||||
|
||||
if ( $switched_blog ) {
|
||||
restore_current_blog();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-beta2-58406';
|
||||
$wp_version = '6.6-beta2-58407';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue