[wp-trac] [WordPress Trac] #58137: WP creates unnecessary "cropped-"[filename] icon file
WordPress Trac
noreply at wordpress.org
Sat Oct 7 11:18:39 UTC 2023
#58137: WP creates unnecessary "cropped-"[filename] icon file
-----------------------------------------+-----------------------
Reporter: thomask | Owner: antpb
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.4
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch changes-requested | Focuses:
-----------------------------------------+-----------------------
Changes (by oglekler):
* keywords: has-patch needs-refresh => has-patch changes-requested
Comment:
Comment has no sense because we know for sure that this is `$context ===
'site-icon'`:
{{{
// Skip creating a new attachment if the attachment is a Site Icon.
}}}
This line is not working because `_wp_attachment_context` doesn't exist at
this point:
{{{
get_post_meta( $attachment_id, '_wp_attachment_context', true ) ==
$context
}}}
And this condition is now working either became there is no $metadata
array:
{{{
$data['width'] === $metadata['width'] && $data['height'] ===
$metadata['height']
}}}
So, it needs to check something else to make this work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58137#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list