Move most instances of new WP_User to get_userdata(). see #21120.

git-svn-id: http://core.svn.wordpress.org/trunk@21413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2012-08-03 01:06:05 +00:00
parent 3a0841fee7
commit 7127ed1197
16 changed files with 56 additions and 59 deletions

View File

@@ -249,7 +249,8 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p
global $wpdb;
$user = new WP_User( $user_id );
if ( ! $user = get_userdata( $user_id ) )
return array();
$post_type_obj = get_post_type_object($post_type);
if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {