Make WordPress Core


Ignore:
Timestamp:
05/12/2010 08:45:18 PM (14 years ago)
Author:
nacin
Message:

Move post type object capabilities to a 'cap' object. Allow them to be initialized via the 'capabilities' key (an array) when registering support for the post type. Caps are now referred to by the name of the cap as if it was a post, i.e. ->cap->edit_post. see #13358.

File:
1 edited

Legend:

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

    r14426 r14585  
    1515    $post_type = $post->post_type;
    1616    $post_type_object = get_post_type_object($post_type);
    17     $can_publish = current_user_can($post_type_object->publish_cap);
     17    $can_publish = current_user_can($post_type_object->cap->publish_posts);
    1818?>
    1919<div class="submitbox" id="submitpost">
Note: See TracChangeset for help on using the changeset viewer.