Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_private_posts_cap_sql [ WordPress Function ]

get_private_posts_cap_sql ( $post_type )
Parameters:
  • (string) $post_type currently only supports 'post' or 'page'.
Uses:
  • $user_ID
Returns:
  • (string) SQL code that can be added to a where clause.
Defined at:



Retrieve 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.

Source


<?php
function get_private_posts_cap_sql$post_type ) {
    return 
get_posts_by_author_sql$post_typefalse );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics