Make WordPress Core

Changeset 22056


Ignore:
Timestamp:
09/27/2012 12:48:59 PM (12 years ago)
Author:
ryan
Message:

Add publish_post meta cap. Props nacin. fixes #21288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r21940 r22056  
    11361136            $caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
    11371137        break;
     1138    case 'publish_post':
     1139        $post = get_post( $args[0] );
     1140        $post_type = get_post_type_object( $post->post_type );
     1141
     1142        $caps[] = $post_type->cap->publish_posts;
     1143        break;
    11381144    case 'edit_post_meta':
    11391145    case 'delete_post_meta':
Note: See TracChangeset for help on using the changeset viewer.