WordPress.org

Make WordPress Core

Ticket #21288: 21288.diff

File 21288.diff, 552 bytes (added by nacin, 8 years ago)

I guess this is the crux of it.

  • wp-includes/capabilities.php

     
    11351135                else
    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':
    11401146        case 'add_post_meta':