File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,6 +233,11 @@ public function compress_image_from_library() {
233233
234234 $ tiny_image = new Tiny_Image ( $ id , $ metadata );
235235 $ result = $ tiny_image ->compress ( $ this ->settings );
236+
237+ // The wp_update_attachment_metadata call is thrown because the
238+ // dimensions of the original image can change. This will then
239+ // trigger other plugins and can result in unexpected behaviour and
240+ // further changes to the image. This may require another approach.
236241 wp_update_attachment_metadata ( $ id , $ tiny_image ->get_wp_metadata () );
237242
238243 echo $ this ->render_compress_details ( $ tiny_image );
@@ -324,8 +329,8 @@ public function media_library_bulk_action() {
324329 check_admin_referer ( 'bulk-media ' );
325330
326331 if ( empty ( $ _REQUEST ['action ' ] ) || (
327- $ _REQUEST [ ' action ' ] != ' tiny_bulk_action ' &&
328- $ _REQUEST [ ' action2 ' ] != ' tiny_bulk_action ' ) ) {
332+ ' tiny_bulk_action ' != $ _REQUEST [ ' action ' ] &&
333+ ' tiny_bulk_action ' != $ _REQUEST [ ' action2 ' ] ) ) {
329334 return ;
330335 }
331336
You can’t perform that action at this time.
0 commit comments