You appear to be a bot. Output may be restricted
Description
Retrieve an array of image posts sorted by ID.
More precisely, returns the smallest $num_posts image posts (measured by ID) which are larger than $from_id.
Usage
$array = Jetpack_Sitemap_Librarian::query_images_after_id( $from_id, $num_posts );
Parameters
- $from_id
- ( int ) required – Greatest lower bound of retrieved image post IDs.
- $num_posts
- ( int ) required – Largest number of image posts to retrieve.
Returns
array The posts.
Source
File name: jetpack/modules/sitemaps/sitemap-librarian.php
Lines:
1 to 18 of 18
public function query_images_after_id( $from_id, $num_posts ) { global $wpdb; return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type='attachment' AND post_mime_type LIKE %s AND ID>%d ORDER BY ID ASC LIMIT %d;", 'image/%', $from_id, $num_posts ) ); // WPCS: db call ok; no-cache ok. }