Elementor\TemplateLibrary\Classes\Import_Images::_return_saved_image PHP Method

_return_saved_image() private method

private _return_saved_image ( $attachment )
    private function _return_saved_image($attachment)
    {
        global $wpdb;
        if (isset($this->_replace_image_ids[$attachment['id']])) {
            return $this->_replace_image_ids[$attachment['id']];
        }
        $post_id = $wpdb->get_var($wpdb->prepare('SELECT `post_id` FROM %1$s
					WHERE `meta_key` = \'_elementor_source_image_hash\'
						AND `meta_value` = \'%2$s\'
				;', $wpdb->postmeta, $this->_get_hash_image($attachment['url'])));
        if ($post_id) {
            $new_attachment = ['id' => $post_id, 'url' => wp_get_attachment_url($post_id)];
            $this->_replace_image_ids[$attachment['id']] = $new_attachment;
            return $new_attachment;
        }
        return false;
    }