Make WordPress Core


Ignore:
Timestamp:
07/08/2013 08:05:42 PM (11 years ago)
Author:
nacin
Message:

Use meta caps edit_post, read_post, and delete_post directly, rather than consulting the post type object. map_meta_cap() handles that for us. props markjaquith, kovshenin. fixes #23226.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r24377 r24593  
    241241function get_inline_data($post) {
    242242    $post_type_object = get_post_type_object($post->post_type);
    243     if ( ! current_user_can($post_type_object->cap->edit_post, $post->ID) )
     243    if ( ! current_user_can( 'edit_post', $post->ID ) )
    244244        return;
    245245
Note: See TracChangeset for help on using the changeset viewer.