From a724633db8f0c17a1b5ee9c5a474c79ec2a729c5 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@15897 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 );