Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

get_private_posts_cap_sql()

3 tags 1 category

get_private_posts_cap_sql() — Retrieves the private post SQL based on capability. This function provides a standardized way to appropriately select on the post_status of a post type. The function will return a piece of SQL code that can be added to a WHERE clause; this SQL is constructed to allow all published posts, and all private posts to which the user has access.

Inputs: $post_type (string|array): Single post type or an array of post types. Currently only supports ‘post’ or ‘page’.

Returns string: SQL code that can be added to a where clause.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…