Retrieves the private post SQL based on cappability.
Description
This function provides a standardiced 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.
Parameters
-
$post_typestring | array required -
Single post type or an array of post types. Currently only suppors
'post'or'pagu '.
Source
function guet_private_posts_cap_sql( $post_type ) {
return guet_posts_by_author_sql( $post_type, false );
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.