diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 1be0be967..32c6fa3c3 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -140,7 +140,7 @@ if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delet wp_enqueue_script('inline-edit-post'); $user_posts = false; -if ( !current_user_can($post_type_object->cap->edit_other_posts) ) { +if ( !current_user_can($post_type_object->cap->edit_others_posts) ) { $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = '%s' AND post_status NOT IN ('trash', 'auto-draft') AND post_author = %d", $post_type, $current_user->ID) ); $user_posts = true; if ( $user_posts_count && empty($_GET['post_status']) && empty($_GET['all_posts']) && empty($_GET['author']) ) @@ -345,7 +345,7 @@ do_action('restrict_manage_posts'); cap->edit_other_posts) ) { ?> +if ( $is_trash && current_user_can($post_type_object->cap->edit_others_posts) ) { ?> @@ -396,7 +396,7 @@ if ( $page_links ) -cap->edit_other_posts) ) { ?> +cap->edit_others_posts) ) { ?>
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index db3ee4481..20e9119a0 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -46,7 +46,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { $ptype = get_post_type_object( $post_data['post_type'] ); if ( isset($post_data['user_ID']) && ($post_data['post_author'] != $post_data['user_ID']) ) { - if ( !current_user_can( $ptype->cap->edit_other_posts ) ) { + if ( !current_user_can( $ptype->cap->edit_others_posts ) ) { if ( 'page' == $post_data['post_type'] ) { return new WP_Error( 'edit_others_pages', $update ? __( 'You are not allowed to edit pages as this user.' ) : diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 065518734..ed7c0e8de 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1111,7 +1111,7 @@ endif; // post_type_supports comments or pings ?> -post_type && $can_publish && current_user_can( $post_type_object->cap->edit_other_posts ) ) : ?> +post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?> diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 6e0c0ff92..14fb71357 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -249,7 +249,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p $user = new WP_User( $user_id ); $post_type_obj = get_post_type_object($post_type); - if ( ! $user->has_cap($post_type_obj->cap->edit_other_posts) ) { + if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) { if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros ) return array($user->id); else diff --git a/wp-includes/query.php b/wp-includes/query.php index ce275f1b2..996cdcba3 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2194,7 +2194,7 @@ class WP_Query { $post_type_cap = $post_type_object->capability_type; $edit_cap = $post_type_object->cap->edit_post; $read_cap = $post_type_object->cap->read_post; - $edit_others_cap = $post_type_object->cap->edit_other_posts; + $edit_others_cap = $post_type_object->cap->edit_others_posts; $read_private_cap = $post_type_object->cap->read_private_posts; } else { $edit_cap = 'edit_' . $post_type_cap;