The Post_IDs
interface describes an object containing post IDs, such as the IDs in a query or a curated set of featured posts.
interface Post_IDs {
public function post_ids(): array;
}
- Empty_Post_IDs: No post IDs.
- Post_IDs_Envelope: Instance from an existing set of IDs.
- Post_IDs_Once: Always returns the same set of IDs from the original instance.
- Used_Post_IDs: Track post IDs that have been used, e.g. while rendering a page.
- WP_Query_Post_IDs: The post IDs from a
WP_Query
.
All Post_Query
implementations also implement Post_IDs
.