Make WordPress Core


Ignore:
Timestamp:
01/04/2021 05:43:30 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: Make sure filtering attachment image attributes only affects front end and not the admin area.

Props denisco.
Fixes #52212.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php

    r49826 r49930  
    418418function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, $size ) {
    419419
     420        if ( is_admin() ) {
     421                return $attr;
     422        }
     423
    420424        if ( isset( $attr['class'] ) && false !== strpos( $attr['class'], 'custom-logo' ) ) {
    421425                return $attr;
Note: See TracChangeset for help on using the changeset viewer.