From 96052a12a520a1797670a4160550e96518413e41 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 21 Oct 2010 16:28:35 +0000 Subject: [PATCH] Only dumb down delete_others_posts if it deserves to exist. fixes a notice. see #14122. git-svn-id: https://develop.svn.wordpress.org/trunk@15897 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 15528c8ef0..14e31ef96c 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1019,7 +1019,8 @@ function get_post_type_capabilities( $args ) { if ( ! post_type_supports( $args->name, 'author' ) ) { // While these may be checked in core, users/roles shouldn't need to be granted these. $default_capabilities['edit_others_posts'] = $default_capabilities['edit_posts']; - $default_capabilities['delete_others_posts'] = $default_capabilities['delete_posts']; + if ( $args->map_meta_cap ) + $default_capabilities['delete_others_posts'] = $default_capabilities['delete_posts']; } $capabilities = array_merge( $default_capabilities, $args->capabilities );