mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Twenty Twenty-One: Make sure filtering attachment image attributes only affects front end and not the admin area.
Props denisco. Fixes #52212. git-svn-id: https://develop.svn.wordpress.org/trunk@49930 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -417,6 +417,10 @@ add_filter( 'the_password_form', 'twenty_twenty_one_password_form' );
|
||||
*/
|
||||
function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, $size ) {
|
||||
|
||||
if ( is_admin() ) {
|
||||
return $attr;
|
||||
}
|
||||
|
||||
if ( isset( $attr['class'] ) && false !== strpos( $attr['class'], 'custom-logo' ) ) {
|
||||
return $attr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user