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/post-new.php

    r14571 r14585  
    4747
    4848// Show post form.
    49 if ( current_user_can($post_type_object->edit_type_cap) ) {
     49if ( current_user_can($post_type_object->cap->edit_posts) ) {
    5050    $post = get_default_post_to_edit( $post_type, true );
    5151    $post_ID = $post->ID;
Note: See TracChangeset for help on using the changeset viewer.