WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2012 10:15:43 PM (9 years ago)
Author:
ryan
Message:

Use the create_posts capability in more places.

In get_post_type_capabilities(), make sure create_posts reflects customizations to the edit_posts capability when create_posts is not specifically set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post-new.php

    r20453 r22291  
    3737$editing = true;
    3838
    39 if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
     39if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) )
    4040    wp_die( __( 'Cheatin’ uh?' ) );
    4141
Note: See TracChangeset for help on using the changeset viewer.