Add publish_post meta cap. Props nacin. fixes #21288

git-svn-id: http://core.svn.wordpress.org/trunk@22056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-09-27 12:48:59 +00:00
parent da06db31a3
commit afe19c7437
1 changed files with 6 additions and 0 deletions

View File

@ -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':