mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
Twenty Twenty-One: Make sure filtering attachment image attributes only affects front end and not the admin area.
This brings the changes from [49930] to the 5.6 branch. Props denisco, SergeyBiryukov. Fixes #52212. Built from https://develop.svn.wordpress.org/branches/5.6@50043 git-svn-id: http://core.svn.wordpress.org/branches/5.6@49744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
955c7aaf24
commit
4ac068c40f
@ -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;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6.1-alpha-50042';
|
||||
$wp_version = '5.6.1-alpha-50043';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user