From afe19c743751dc4ba453e85996ebe275e0db03b1 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 27 Sep 2012 12:48:59 +0000 Subject: [PATCH] Add publish_post meta cap. Props nacin. fixes #21288 git-svn-id: http://core.svn.wordpress.org/trunk@22056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 825272354f..3f0a9ce816 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -1135,6 +1135,12 @@ function map_meta_cap( $cap, $user_id ) { else $caps = map_meta_cap( 'edit_post', $user_id, $post->ID ); break; + case 'publish_post': + $post = get_post( $args[0] ); + $post_type = get_post_type_object( $post->post_type ); + + $caps[] = $post_type->cap->publish_posts; + break; case 'edit_post_meta': case 'delete_post_meta': case 'add_post_meta':