Use the create_posts post type cap in more places. Remove the janky create_posts meta cap. see #16714.

git-svn-id: https://develop.svn.wordpress.org/trunk@22908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-11-28 22:28:20 +00:00
parent 4e51b43ad3
commit 5aac5cb3de
6 changed files with 12 additions and 15 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ require_once('./admin.php');
header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( 'create_posts' ) )
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) )
wp_die( __( 'Cheatin’ uh?' ) );
/**