Skip to content

Commit

Permalink
fix variable
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Mar 11, 2024
1 parent 1ee7d5a commit b79d4b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/Bulk/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,14 @@ public function run_optimize( string $context, int $optimization_level ) {

$media_ids = $this->get_bulk_instance( $context )->get_unoptimized_media_ids( $optimization_level );

if ( empty( $media_ids['ids'] ) ) {
if ( empty( $media_ids ) ) {
return [
'success' => false,
'message' => 'no-images',
];
}
$media_ids['ids'] = array_unique( $media_ids['ids'] );

foreach ( $media_ids['ids'] as $media_id ) {
foreach ( $media_ids as $media_id ) {
try {
as_enqueue_async_action(
'imagify_optimize_media',
Expand Down

0 comments on commit b79d4b4

Please sign in to comment.