Fix typos in [13729]. edit_type_cap is a primitive cap, not meta. @todo: audit ptype cap calls.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b35eb435a3
commit
e2c3b87693
|
@ -241,7 +241,7 @@ function bulk_edit_posts( $post_data = null ) {
|
|||
else
|
||||
$ptype = get_post_type_object('post');
|
||||
|
||||
if ( !current_user_can( $ptype->edit_type_cap, $post_ID ) ) {
|
||||
if ( !current_user_can( $ptype->edit_type_cap ) ) {
|
||||
if ( 'page' == $ptype->name )
|
||||
wp_die( __('You are not allowed to edit pages.'));
|
||||
else
|
||||
|
@ -492,7 +492,7 @@ function wp_write_post() {
|
|||
else
|
||||
$ptype = get_post_type_object('post');
|
||||
|
||||
if ( !current_user_can( $ptype->edit_type_cap, $post_ID ) ) {
|
||||
if ( !current_user_can( $ptype->edit_type_cap ) ) {
|
||||
if ( 'page' == $ptype->name )
|
||||
return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this blog.' ) );
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue