Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
krugazul committed Jan 15, 2021
2 parents 811a09f + 4945117 commit 1417330
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions classes/class-lsx-wetu-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -986,9 +986,9 @@ public function is_image_being_used( $image_id = '', $post_id = '' ) {
global $wpdb;
$being_used = false;
if ( '' !== $image_id ) {
$sql = "SELECT * FROM `{$wpdb->postmeta}` WHERE `post_id` != {$post_id} `meta_key` LIKE '_thumbnail_id' AND `meta_value` LIKE '{$image_id}'";
$sql = "SELECT * FROM `{$wpdb->postmeta}` WHERE `post_id` != {$post_id} AND `meta_key` LIKE '_thumbnail_id' AND `meta_value` LIKE '{$image_id}'";
$results = $wpdb->query( $sql );
if ( ! empty( $results ) ) {
if ( false !== $results && ! empty( $results ) ) {
$being_used = true;
}
}
Expand Down
33 changes: 20 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1417330

Please sign in to comment.