/** * Get images given a list of IDs * * @param $pids array of picture_ids * @return An array of nggImage objects representing the images */ static function find_images_in_list($pids, $exclude = false, $order = 'NOTSET') { global $wpdb; $qry = nggdb::find_images_query($pids, $exclude, $order); //Build query to get images $images = $wpdb->get_results($qry, OBJECT_K); $result = array(); // Build the image objects from the query result if ($images) { foreach ($images as $key => $image) { $result[$key] = new nggImage($image); } } return $result; }