Skip to content

Commit

Permalink
Fix Codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Feb 21, 2024
1 parent 112c9ef commit ab748bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions classes/Bulk/WP.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ public function get_optimized_media_ids_without_format( $format ) {
] );
$nextgen_suffix = constant( imagify_get_optimization_process_class_name( 'wp' ) . '::' . strtoupper( $format ) . '_SUFFIX' );

$query = "
$ids = $wpdb->get_col( $wpdb->prepare( // WPCS: unprepared SQL ok.
"
SELECT p.ID
FROM $wpdb->posts AS p
$nodata_join
Expand All @@ -333,9 +334,7 @@ public function get_optimized_media_ids_without_format( $format ) {
AND p.post_status IN ( $statuses )
$nodata_where
ORDER BY p.ID DESC
LIMIT 0, %d";
$ids = $wpdb->get_col( $wpdb->prepare( // WPCS: unprepared SQL ok.
$query,
LIMIT 0, %d",
'%' . $wpdb->esc_like( $nextgen_suffix . '";a:4:{s:7:"success";b:1;' ) . '%',
imagify_get_unoptimized_attachment_limit()
) );
Expand Down

0 comments on commit ab748bb

Please sign in to comment.