get_others_unpublished_posts [ WordPress Function ]
get_others_unpublished_posts ( $user_id, $type = 'any' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_the_author_posts, get_others_drafts, get_others_pending, check_and_publish_future_post, wp_publish_post
Retrieve editable posts from other users.
Source
<?php
function get_others_unpublished_posts($user_id, $type='any') {
_deprecated_function( __FUNCTION__, '3.1' );
global $wpdb;
$editable = get_editable_user_ids( $user_id );
if ( in_array($type, array('draft', 'pending')) )
$type_sql = " post_status = '$type' ";
else
$type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
$dir = ( 'pending' == $type ) ? 'ASC' : 'DESC';
if ( !$editable ) {
$other_unpubs = '';
} else {
$editable = join(',', $editable);
$other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) );
}
return apply_filters('get_others_drafts', $other_unpubs);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- get_others_unpublished_posts() WordPress function reference ...
get_others_unpublished_posts(). This function had been marked as deprecated. Retrieve editable posts from other users.
queryposts.com - deprecated.php - PHP Cross Reference of WordPress Source - Yoast
Jun 1, 2011 ... prepare_vars_for_template_usage() do_paging() get_results() page_links() results_are_paged() is_search() get_others_unpublished_posts() ...
xref.yoast.com - WordPress : /wp-admin/includes/deprecated.php source
638 */ 639 function get_others_unpublished_posts($user_id, $type='any') { 640 _deprecated_function( __FUNCTION__, '3.1' ); 641 642 global $wpdb; 643 644 ...
phpxref.ftwr.co.uk - <?php // Creates a new user from the "Users" form using $_POST ...
... function get_others_unpublished_posts($user_id, $type='any') { global $wpdb; $editable = get_editable_user_ids( $user_id ); if ( in_array($type, array('draft', ...
core.svn.wordpress.org