function get_attachment_id_from_url_with_resolution_unsafe($url) { $file = all_around_functions::get_filename_from_url($url); $query = "SELECT post_id FROM " . $this->get_db_postmeta_table() . " WHERE meta_value LIKE '%" . $file . "%'"; $id = $this->db_get_var($query); if ($id == NULL) { return NULL; } return $id; }