Make WordPress Core

Changeset 58407

Timestamp:
06/13/2024 02:46:08 PM (6 weeks ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

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

    r58382 r58407  
    10361036
    10371037    $custom_logo_id = get_theme_mod( 'custom_logo' );
    1038     $is_image       = wp_attachment_is_image( $custom_logo_id );
     1038    $is_image       = ;
    10391039
    10401040    if ( $switched_blog ) {
Note: See TracChangeset for help on using the changeset viewer.