wpseek.com
				Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
			get_others_unpublished_posts is deprecated since version 3.1.0!
Alternative: Use
Alternative: Use
get_others_unpublished_posts › WordPress Function
Seit2.3.0
Veraltet3.1.0
› get_others_unpublished_posts ( $user_id, $type = 'any' )
| Parameter: (2) | 
 | 
| Siehe: | |
| Gibt zurück: | 
 | 
| Definiert in: | 
 | 
| Codex: | 
Retrieves editable posts from other users.
Ähnliche Funktionen: get_the_author_posts, get_others_drafts, get_others_pending, get_the_author_posts_link, wp_publish_post
	Quellcode
function get_others_unpublished_posts( $user_id, $type = 'any' ) {
	_deprecated_function( __FUNCTION__, '3.1.0' );
	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);
}