Text Changes: Unify permission error messages.

The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-06-29 15:16:29 +00:00
parent 0b7b8981aa
commit 25e66e4f1e
66 changed files with 196 additions and 196 deletions

View File

@ -272,7 +272,7 @@ if ( isset($plugin_page) ) {
$importer = $_GET['import'];
if ( ! current_user_can('import') )
wp_die(__('You are not allowed to import.'));
wp_die(__('Sorry, you are not allowed to import.'));
if ( validate_file($importer) ) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );

View File

@ -45,7 +45,7 @@ if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']
}
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'You do not have permission to upload files.' ) );
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
}
// just fetch the detail form for that attachment
@ -54,7 +54,7 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( 'attachment' != $post->post_type )
wp_die( __( 'Unknown post type.' ) );
if ( ! current_user_can( 'edit_post', $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
switch ( $_REQUEST['fetch'] ) {
case 3 :

View File

@ -61,7 +61,7 @@ case 'editcomment' :
comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
if ( !current_user_can( 'edit_comment', $comment_id ) )
comment_footer_die( __('You are not allowed to edit this comment.') );
comment_footer_die( __('Sorry, you are not allowed to edit this comment.') );
if ( 'trash' == $comment->comment_approved )
comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
@ -254,7 +254,7 @@ case 'unapprovecomment' :
if ( !$comment = get_comment($comment_id) )
comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
comment_footer_die( __('You are not allowed to edit comments on this post.') );
comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
$redir = wp_get_referer();

View File

@ -966,7 +966,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
*/
public function admin_page() {
if ( ! current_user_can('edit_theme_options') )
wp_die(__('You do not have permission to customize headers.'));
wp_die(__('Sorry, you are not allowed to customize headers.'));
$step = $this->step();
if ( 2 == $step )
$this->step_2();

View File

@ -15,7 +15,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'customize' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to customize this site.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
403
);
}

View File

@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'edit_posts' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
403
);
}
@ -210,7 +210,7 @@ if ( isset( $_REQUEST['error'] ) ) {
$error_msg = __( 'Invalid comment ID.' );
break;
case 2 :
$error_msg = __( 'You are not allowed to edit comments on this post.' );
$error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
break;
}
if ( $error_msg )

View File

@ -18,13 +18,13 @@ if ( ! $tax )
wp_die( __( 'Invalid taxonomy' ) );
if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
wp_die( __( 'You are not allowed to manage these items.' ) );
wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
}
if ( ! current_user_can( $tax->cap->manage_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
403
);
}
@ -71,7 +71,7 @@ case 'add-tag':
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to add this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
403
);
}
@ -111,7 +111,7 @@ case 'delete':
if ( ! current_user_can( $tax->cap->delete_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
403
);
}
@ -128,7 +128,7 @@ case 'bulk-delete':
if ( ! current_user_can( $tax->cap->delete_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
403
);
}
@ -171,7 +171,7 @@ case 'editedtag':
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
403
);
}
@ -297,7 +297,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
403
);
}

View File

@ -13,7 +13,7 @@ if ( ! $typenow )
wp_die( __( 'Invalid post type' ) );
if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
wp_die( __( 'You are not allowed to edit posts in this post type.' ) );
wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
}
if ( 'attachment' === $typenow ) {
@ -37,7 +37,7 @@ if ( ! $post_type_object )
if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit posts in this post type.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>',
403
);
}
@ -103,7 +103,7 @@ if ( $doaction ) {
foreach ( (array) $post_ids as $post_id ) {
if ( !current_user_can( 'delete_post', $post_id) )
wp_die( __('You are not allowed to move this item to the Trash.') );
wp_die( __('Sorry, you are not allowed to move this item to the Trash.') );
if ( wp_check_post_lock( $post_id ) ) {
$locked++;
@ -122,7 +122,7 @@ if ( $doaction ) {
$untrashed = 0;
foreach ( (array) $post_ids as $post_id ) {
if ( !current_user_can( 'delete_post', $post_id) )
wp_die( __('You are not allowed to restore this item from the Trash.') );
wp_die( __('Sorry, you are not allowed to restore this item from the Trash.') );
if ( !wp_untrash_post($post_id) )
wp_die( __('Error in restoring from Trash.') );
@ -137,7 +137,7 @@ if ( $doaction ) {
$post_del = get_post($post_id);
if ( !current_user_can( 'delete_post', $post_id ) )
wp_die( __('You are not allowed to delete this item.') );
wp_die( __('Sorry, you are not allowed to delete this item.') );
if ( $post_del->post_type == 'attachment' ) {
if ( ! wp_delete_attachment($post_id) )

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( !current_user_can('export') )
wp_die(__('You do not have sufficient permissions to export the content of this site.'));
wp_die(__('Sorry, you are not allowed to export the content of this site.'));
/** Load WordPress export API */
require_once( ABSPATH . 'wp-admin/includes/export.php' );

View File

@ -12,7 +12,7 @@ define('WP_LOAD_IMPORTERS', true);
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( !current_user_can('import') )
wp_die(__('You do not have sufficient permissions to import content in this site.'));
wp_die(__('Sorry, you are not allowed to import content in this site.'));
$title = __('Import');

View File

@ -1622,10 +1622,10 @@ function wp_ajax_inline_save() {
if ( 'page' == $_POST['post_type'] ) {
if ( ! current_user_can( 'edit_page', $post_ID ) )
wp_die( __( 'You are not allowed to edit this page.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this page.' ) );
} else {
if ( ! current_user_can( 'edit_post', $post_ID ) )
wp_die( __( 'You are not allowed to edit this post.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
}
if ( $last = wp_check_post_lock( $post_ID ) ) {
@ -2020,7 +2020,7 @@ function wp_ajax_upload_attachment() {
echo wp_json_encode( array(
'success' => false,
'data' => array(
'message' => __( 'You do not have permission to upload files.' ),
'message' => __( 'Sorry, you are not allowed to upload files.' ),
'filename' => $_FILES['async-upload']['name'],
)
) );
@ -3302,7 +3302,7 @@ function wp_ajax_install_theme() {
);
if ( ! current_user_can( 'install_themes' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to install themes on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to install themes on this site.' );
wp_send_json_error( $status );
}
@ -3398,7 +3398,7 @@ function wp_ajax_update_theme() {
);
if ( ! current_user_can( 'update_themes' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to update themes on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to update themes on this site.' );
wp_send_json_error( $status );
}
@ -3476,7 +3476,7 @@ function wp_ajax_delete_theme() {
);
if ( ! current_user_can( 'delete_themes' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to delete themes on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to delete themes on this site.' );
wp_send_json_error( $status );
}
@ -3540,7 +3540,7 @@ function wp_ajax_install_plugin() {
);
if ( ! current_user_can( 'install_plugins' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to install plugins on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to install plugins on this site.' );
wp_send_json_error( $status );
}
@ -3638,7 +3638,7 @@ function wp_ajax_update_plugin() {
}
if ( ! current_user_can( 'update_plugins' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to update plugins for this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to update plugins for this site.' );
wp_send_json_error( $status );
}
@ -3727,7 +3727,7 @@ function wp_ajax_delete_plugin() {
);
if ( ! current_user_can( 'delete_plugins' ) ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to delete plugins for this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to delete plugins for this site.' );
wp_send_json_error( $status );
}
@ -3787,7 +3787,7 @@ function wp_ajax_search_plugins() {
$status = array();
if ( ! $wp_list_table->ajax_user_can() ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to manage plugins on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to manage plugins for this site.' );
wp_send_json_error( $status );
}
@ -3827,7 +3827,7 @@ function wp_ajax_search_install_plugins() {
$status = array();
if ( ! $wp_list_table->ajax_user_can() ) {
$status['errorMessage'] = __( 'You do not have sufficient permissions to manage plugins on this site.' );
$status['errorMessage'] = __( 'Sorry, you are not allowed to manage plugins on this site.' );
wp_send_json_error( $status );
}

View File

@ -29,7 +29,7 @@ function edit_link( $link_id = 0 ) {
if ( ! current_user_can( 'manage_links' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You do not have sufficient permissions to edit the links for this site.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>',
403
);
}
@ -312,5 +312,5 @@ function wp_link_manager_disabled_message() {
wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );
}
wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
}

View File

@ -46,7 +46,7 @@ function comment_exists( $comment_author, $comment_date, $timezone = 'blog' ) {
*/
function edit_comment() {
if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
wp_die ( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
if ( isset( $_POST['newcomment_author'] ) )
$_POST['comment_author'] = $_POST['newcomment_author'];

View File

@ -3121,7 +3121,7 @@ function wp_media_attach_action( $parent_id, $action = 'attach' ) {
}
if ( ! current_user_can( 'edit_post', $parent_id ) ) {
wp_die( __( 'You are not allowed to edit this post.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
}
$ids = array();
foreach ( (array) $_REQUEST['media'] as $att_id ) {

View File

@ -339,7 +339,7 @@ if ( !user_can_access_admin_page() ) {
*/
do_action( 'admin_page_access_denied' );
wp_die( __( 'You do not have sufficient permissions to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$menu = add_menu_classes($menu);

View File

@ -30,14 +30,14 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) {
if ( 'page' == $post_data['post_type'] )
return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) );
return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
else
return new WP_Error( 'edit_others_posts', __( 'You are not allowed to edit posts as this user.' ) );
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
} elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) {
if ( 'page' == $post_data['post_type'] )
return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );
return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
else
return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) );
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
}
if ( isset( $post_data['content'] ) )
@ -68,14 +68,14 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
&& ! current_user_can( $ptype->cap->edit_others_posts ) ) {
if ( $update ) {
if ( 'page' == $post_data['post_type'] )
return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) );
return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
else
return new WP_Error( 'edit_others_posts', __( 'You are not allowed to edit posts as this user.' ) );
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
} else {
if ( 'page' == $post_data['post_type'] )
return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );
return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
else
return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) );
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
}
}
@ -210,9 +210,9 @@ function edit_post( $post_data = null ) {
$ptype = get_post_type_object($post_data['post_type']);
if ( !current_user_can( 'edit_post', $post_ID ) ) {
if ( 'page' == $post_data['post_type'] )
wp_die( __('You are not allowed to edit this page.' ));
wp_die( __('Sorry, you are not allowed to edit this page.' ));
else
wp_die( __('You are not allowed to edit this post.' ));
wp_die( __('Sorry, you are not allowed to edit this post.' ));
}
if ( post_type_supports( $ptype->name, 'revisions' ) ) {
@ -428,9 +428,9 @@ function bulk_edit_posts( $post_data = null ) {
if ( !current_user_can( $ptype->cap->edit_posts ) ) {
if ( 'page' == $ptype->name )
wp_die( __('You are not allowed to edit pages.'));
wp_die( __('Sorry, you are not allowed to edit pages.'));
else
wp_die( __('You are not allowed to edit posts.'));
wp_die( __('Sorry, you are not allowed to edit posts.'));
}
if ( -1 == $post_data['_status'] ) {
@ -721,9 +721,9 @@ function wp_write_post() {
if ( !current_user_can( $ptype->cap->edit_posts ) ) {
if ( 'page' == $ptype->name )
return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this site.' ) );
return new WP_Error( 'edit_pages', __( 'Sorry, you are not allowed to create pages on this site.' ) );
else
return new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this site.' ) );
return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) );
}
$_POST['post_mime_type'] = '';
@ -1724,11 +1724,11 @@ function post_preview() {
$_POST['ID'] = $post_ID;
if ( ! $post = get_post( $post_ID ) ) {
wp_die( __( 'You are not allowed to edit this post.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
}
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
wp_die( __( 'You are not allowed to edit this post.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
}
$is_autosave = false;
@ -1786,7 +1786,7 @@ function wp_autosave( $post_data ) {
$post = get_post( $post_id );
if ( ! current_user_can( 'edit_post', $post->ID ) ) {
return new WP_Error( 'edit_posts', __( 'You are not allowed to edit this item.' ) );
return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to edit this item.' ) );
}
if ( 'auto-draft' == $post->post_status )

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can('manage_links') )
wp_die(__('You do not have sufficient permissions to add links to this site.'));
wp_die(__('Sorry, you are not allowed to add links to this site.'));
$title = __('Add New Link');
$parent_file = 'link-manager.php';

View File

@ -9,7 +9,7 @@
/** Load WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_links' ) )
wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
$wp_list_table = _get_list_table('WP_Links_List_Table');
@ -68,7 +68,7 @@ get_current_screen()->set_screen_reader_content( array(
include_once( ABSPATH . 'wp-admin/admin-header.php' );
if ( ! current_user_can('manage_links') )
wp_die(__("You do not have sufficient permissions to edit the links for this site."));
wp_die(__('Sorry, you are not allowed to edit the links for this site.'));
?>

View File

@ -13,7 +13,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if (!current_user_can('upload_files'))
wp_die(__('You do not have permission to upload files.'));
wp_die(__('Sorry, you are not allowed to upload files.'));
wp_enqueue_script('plupload-handlers');

View File

@ -16,7 +16,7 @@ if ( ! isset( $_GET['inline'] ) )
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'You do not have permission to upload files.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
}
wp_enqueue_script('plupload-handlers');
@ -43,7 +43,7 @@ if ( isset( $action ) && $action == 'edit' && !$ID ) {
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
403
);
}

View File

@ -20,7 +20,7 @@ case 'editattachment' :
check_admin_referer('media-form');
if ( !current_user_can('edit_post', $attachment_id) )
wp_die ( __('You are not allowed to edit this attachment.') );
wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
$errors = media_upload_form_handler();
@ -54,7 +54,7 @@ case 'edit' :
$att_id = (int) $_GET['attachment_id'];
if ( !current_user_can('edit_post', $att_id) )
wp_die ( __('You are not allowed to edit this attachment.') );
wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
$att = get_post($att_id);

View File

@ -13,7 +13,7 @@ if ( !is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'delete_site' ) )
wp_die(__( 'You do not have sufficient permissions to delete this site.'));
wp_die(__( 'Sorry, you are not allowed to delete this site.'));
if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) {

View File

@ -13,7 +13,7 @@ if ( !is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can('read') )
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
$action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';

View File

@ -22,7 +22,7 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets'
if ( ! current_user_can( 'edit_theme_options' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
403
);
}

View File

@ -16,7 +16,7 @@ define( 'WP_INSTALLING_NETWORK', true );
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! is_super_admin() ) {
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
}
if ( is_multisite() ) {

View File

@ -17,7 +17,7 @@ if ( !is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$title = __( 'Dashboard' );
$parent_file = 'index.php';

View File

@ -17,7 +17,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network_options' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$title = __( 'Network Settings' );
$parent_file = 'settings.php';

View File

@ -15,7 +15,7 @@ if ( ! is_multisite() ) {
}
if ( ! current_user_can( 'manage_sites' ) ) {
wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
}
get_current_screen()->add_help_tab( array(
@ -47,7 +47,7 @@ if ( ! $details ) {
}
if ( ! can_edit_network( $details->site_id ) ) {
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME );

View File

@ -17,7 +17,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have sufficient permissions to add sites to this network.' ) );
wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) );
get_current_screen()->add_help_tab( array(
'id' => 'overview',

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
get_current_screen()->add_help_tab( array(
'id' => 'overview',
@ -44,7 +44,7 @@ if ( ! $details ) {
}
if ( !can_edit_network( $details->site_id ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$is_main_site = is_main_site( $id );

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
get_current_screen()->add_help_tab( array(
'id' => 'overview',
@ -67,7 +67,7 @@ if ( ! $details ) {
}
if ( !can_edit_network( $details->site_id ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$is_main_site = is_main_site( $id );

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can('manage_sites') )
wp_die(__('You do not have sufficient permissions to edit this site.'));
wp_die(__('Sorry, you are not allowed to edit this site.'));
$wp_list_table = _get_list_table('WP_Users_List_Table');
$wp_list_table->prepare_items();
@ -60,7 +60,7 @@ if ( ! $details ) {
}
if ( ! can_edit_network( $details->site_id ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$is_main_site = is_main_site( $id );

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
$pagenum = $wp_list_table->get_pagenum();
@ -91,7 +91,7 @@ if ( isset( $_GET['action'] ) ) {
}
if ( $current_site->blog_id == $id ) {
wp_die( __( 'You are not allowed to change the current site.' ) );
wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
}
$site_details = get_blog_details( $id );
@ -126,7 +126,7 @@ if ( isset( $_GET['action'] ) ) {
case 'deleteblog':
if ( ! current_user_can( 'delete_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
$updated_action = 'not_deleted';
if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
@ -144,7 +144,7 @@ if ( isset( $_GET['action'] ) ) {
switch ( $doaction ) {
case 'delete':
if ( ! current_user_can( 'delete_site', $val ) )
wp_die( __( 'You are not allowed to delete the site.' ) );
wp_die( __( 'Sorry, you are not allowed to delete the site.' ) );
$updated_action = 'all_delete';
wpmu_delete_blog( $val, true );
@ -157,7 +157,7 @@ if ( isset( $_GET['action'] ) ) {
break;
}
} else {
wp_die( __( 'You are not allowed to change the current site.' ) );
wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
}
}
} else {
@ -237,7 +237,7 @@ if ( isset( $_GET['updated'] ) ) {
$msg = __( 'Site deleted.' );
break;
case 'not_deleted':
$msg = __( 'You do not have permission to delete that site.' );
$msg = __( 'Sorry, you are not allowed to delete that site.' );
break;
case 'archiveblog':
$msg = __( 'Site archived.' );

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( !current_user_can('manage_network_themes') )
wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
$pagenum = $wp_list_table->get_pagenum();
@ -90,7 +90,7 @@ if ( $action ) {
exit;
case 'delete-selected':
if ( ! current_user_can( 'delete_themes' ) ) {
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
wp_die( __('Sorry, you are not allowed to delete themes for this site.') );
}
check_admin_referer( 'bulk-themes' );

View File

@ -36,7 +36,7 @@ get_current_screen()->set_help_sidebar(
require_once( ABSPATH . 'wp-admin/admin-header.php' );
if ( ! current_user_can( 'manage_network' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
echo '<div class="wrap">';
echo '<h1>' . __( 'Upgrade Network' ) . '</h1>';

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can('create_users') )
wp_die(__('You do not have sufficient permissions to add users to this network.'));
wp_die(__('Sorry, you are not allowed to add users to this network.'));
get_current_screen()->add_help_tab( array(
'id' => 'overview',
@ -34,7 +34,7 @@ if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {
check_admin_referer( 'add-user', '_wpnonce_add-user' );
if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( ! is_array( $_POST['user'] ) )
wp_die( __( 'Cannot create an empty user.' ) );

View File

@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( isset( $_GET['action'] ) ) {
/** This action is documented in wp-admin/network/edit.php */
@ -23,7 +23,7 @@ if ( isset( $_GET['action'] ) ) {
switch ( $_GET['action'] ) {
case 'deleteuser':
if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
check_admin_referer( 'deleteuser' );
@ -44,7 +44,7 @@ if ( isset( $_GET['action'] ) ) {
case 'allusers':
if ( !current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
check_admin_referer( 'bulk-users-network' );
@ -57,7 +57,7 @@ if ( isset( $_GET['action'] ) ) {
switch ( $doaction ) {
case 'delete':
if ( ! current_user_can( 'delete_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$title = __( 'Users' );
$parent_file = 'users.php';
require_once( ABSPATH . 'wp-admin/admin-header.php' );
@ -106,7 +106,7 @@ if ( isset( $_GET['action'] ) ) {
case 'dodelete':
check_admin_referer( 'ms-users-delete' );
if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) {
foreach ( $_POST['blog'] as $id => $users ) {

View File

@ -9,7 +9,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __('Discussion Settings');
$parent_file = 'options-general.php';

View File

@ -13,7 +13,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __('General Settings');
$parent_file = 'options-general.php';

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __('Media Settings');
$parent_file = 'options-general.php';

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __('Permalink Settings');
$parent_file = 'options-general.php';

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __( 'Reading Settings' );
$parent_file = 'options-general.php';

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'manage_options' ) )
wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
$title = __('Writing Settings');
$parent_file = 'options-general.php';

View File

@ -47,7 +47,7 @@ if ( empty($option_page) ) {
if ( ! current_user_can( $capability ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
403
);
}
@ -76,7 +76,7 @@ if ( is_multisite() ) {
if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
403
);
}
@ -160,7 +160,7 @@ if ( 'update' == $action ) {
if ( 'options' == $option_page ) {
if ( is_multisite() && ! is_super_admin() )
wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
} else {
$options = $whitelist_options[ $option_page ];

View File

@ -15,7 +15,7 @@ if ( is_multisite() && ! is_network_admin() ) {
}
if ( !current_user_can('edit_plugins') )
wp_die( __('You do not have sufficient permissions to edit plugins for this site.') );
wp_die( __('Sorry, you are not allowed to edit plugins for this site.') );
$title = __("Edit Plugins");
$parent_file = 'plugins.php';

View File

@ -15,7 +15,7 @@ if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-informat
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can('install_plugins') )
wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
wp_die(__('Sorry, you are not allowed to install plugins on this site.'));
if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( 'plugin-install.php' ) );

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can('activate_plugins') )
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) );
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
$pagenum = $wp_list_table->get_pagenum();
@ -30,7 +30,7 @@ if ( $action ) {
switch ( $action ) {
case 'activate':
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
@ -69,7 +69,7 @@ if ( $action ) {
case 'activate-selected':
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
check_admin_referer('bulk-plugins');
@ -147,7 +147,7 @@ if ( $action ) {
case 'error_scrape':
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
check_admin_referer('plugin-activation-error_' . $plugin);
@ -168,7 +168,7 @@ if ( $action ) {
case 'deactivate':
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
check_admin_referer('deactivate-plugin_' . $plugin);
@ -193,7 +193,7 @@ if ( $action ) {
case 'deactivate-selected':
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
check_admin_referer('bulk-plugins');
@ -228,7 +228,7 @@ if ( $action ) {
case 'delete-selected':
if ( ! current_user_can('delete_plugins') ) {
wp_die(__('You do not have sufficient permissions to delete plugins for this site.'));
wp_die(__('Sorry, you are not allowed to delete plugins for this site.'));
}
check_admin_referer('bulk-plugins');

View File

@ -57,7 +57,7 @@ $editing = true;
if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
403
);
}

View File

@ -110,11 +110,11 @@ case 'edit':
wp_die( __( 'Unknown post type.' ) );
if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
wp_die( __( 'You are not allowed to edit posts in this post type.' ) );
wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
}
if ( ! current_user_can( 'edit_post', $post_id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
if ( 'trash' == $post->post_status )
wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
@ -211,7 +211,7 @@ case 'trash':
wp_die( __( 'Unknown post type.' ) );
if ( ! current_user_can( 'delete_post', $post_id ) )
wp_die( __( 'You are not allowed to move this item to the Trash.' ) );
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
if ( $user_id = wp_check_post_lock( $post_id ) ) {
$user = get_userdata( $user_id );
@ -234,7 +234,7 @@ case 'untrash':
wp_die( __( 'Unknown post type.' ) );
if ( ! current_user_can( 'delete_post', $post_id ) )
wp_die( __( 'You are not allowed to restore this item from the Trash.' ) );
wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
if ( ! wp_untrash_post( $post_id ) )
wp_die( __( 'Error in restoring from Trash.' ) );
@ -252,7 +252,7 @@ case 'delete':
wp_die( __( 'Unknown post type.' ) );
if ( ! current_user_can( 'delete_post', $post_id ) )
wp_die( __( 'You are not allowed to delete this item.' ) );
wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
if ( $post->post_type == 'attachment' ) {
$force = ( ! MEDIA_TRASH );

View File

@ -14,7 +14,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
403
);
}

View File

@ -35,7 +35,7 @@ if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to manage this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to manage this item.' ) . '</p>',
403
);
}

View File

@ -15,7 +15,7 @@ if ( is_multisite() && ! is_network_admin() ) {
}
if ( !current_user_can('edit_themes') )
wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site.').'</p>');
wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>');
$title = __("Edit Themes");
$parent_file = 'themes.php';

View File

@ -13,7 +13,7 @@ require( ABSPATH . 'wp-admin/includes/theme-install.php' );
wp_reset_vars( array( 'tab' ) );
if ( ! current_user_can('install_themes') )
wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( 'theme-install.php' ) );

View File

@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
403
);
}
@ -40,7 +40,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
if ( ! current_user_can( 'delete_themes' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
403
);
}

View File

@ -20,7 +20,7 @@ if ( is_multisite() && ! is_network_admin() ) {
}
if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
/**
*
@ -623,7 +623,7 @@ if ( 'upgrade-core' == $action ) {
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
if ( ! current_user_can( 'update_core' ) )
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
check_admin_referer('upgrade-core');
@ -647,7 +647,7 @@ if ( 'upgrade-core' == $action ) {
} elseif ( 'do-plugin-upgrade' == $action ) {
if ( ! current_user_can( 'update_plugins' ) )
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
check_admin_referer('upgrade-core');
@ -675,7 +675,7 @@ if ( 'upgrade-core' == $action ) {
} elseif ( 'do-theme-upgrade' == $action ) {
if ( ! current_user_can( 'update_themes' ) )
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
check_admin_referer('upgrade-core');
@ -705,7 +705,7 @@ if ( 'upgrade-core' == $action ) {
} elseif ( 'do-translation-upgrade' == $action ) {
if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
check_admin_referer( 'upgrade-translations' );

View File

@ -21,7 +21,7 @@ if ( isset($_GET['action']) ) {
if ( 'update-selected' == $action ) {
if ( ! current_user_can( 'update_plugins' ) )
wp_die( __( 'You do not have sufficient permissions to update plugins for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
check_admin_referer( 'bulk-update-plugins' );
@ -47,7 +47,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'upgrade-plugin' == $action ) {
if ( ! current_user_can('update_plugins') )
wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
check_admin_referer('upgrade-plugin_' . $plugin);
@ -68,7 +68,7 @@ if ( isset($_GET['action']) ) {
} elseif ('activate-plugin' == $action ) {
if ( ! current_user_can('update_plugins') )
wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
check_admin_referer('activate-plugin_' . $plugin);
if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
@ -93,7 +93,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'install-plugin' == $action ) {
if ( ! current_user_can('install_plugins') )
wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
@ -141,7 +141,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'upload-plugin' == $action ) {
if ( ! current_user_can( 'upload_plugins' ) ) {
wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
}
check_admin_referer('plugin-upload');
@ -169,7 +169,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'upgrade-theme' == $action ) {
if ( ! current_user_can('update_themes') )
wp_die(__('You do not have sufficient permissions to update themes for this site.'));
wp_die(__('Sorry, you are not allowed to update themes for this site.'));
check_admin_referer('upgrade-theme_' . $theme);
@ -190,7 +190,7 @@ if ( isset($_GET['action']) ) {
include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ( 'update-selected-themes' == $action ) {
if ( ! current_user_can( 'update_themes' ) )
wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
check_admin_referer( 'bulk-update-themes' );
@ -216,7 +216,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'install-theme' == $action ) {
if ( ! current_user_can('install_themes') )
wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
@ -246,7 +246,7 @@ if ( isset($_GET['action']) ) {
} elseif ( 'upload-theme' == $action ) {
if ( ! current_user_can( 'upload_themes' ) ) {
wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
}
check_admin_referer('theme-upload');

View File

@ -10,7 +10,7 @@
require_once( dirname( __FILE__ ) . '/admin.php' );
if ( !current_user_can('upload_files') )
wp_die( __( 'You do not have permission to upload files.' ) );
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
$modes = array( 'grid', 'list' );
@ -132,7 +132,7 @@ if ( $doaction ) {
break;
foreach ( (array) $post_ids as $post_id ) {
if ( !current_user_can( 'delete_post', $post_id ) )
wp_die( __( 'You are not allowed to move this item to the Trash.' ) );
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
if ( !wp_trash_post( $post_id ) )
wp_die( __( 'Error in moving to Trash.' ) );
@ -144,7 +144,7 @@ if ( $doaction ) {
break;
foreach ( (array) $post_ids as $post_id ) {
if ( !current_user_can( 'delete_post', $post_id ) )
wp_die( __( 'You are not allowed to move this item out of the Trash.' ) );
wp_die( __( 'Sorry, you are not allowed to move this item out of the Trash.' ) );
if ( !wp_untrash_post( $post_id ) )
wp_die( __( 'Error in restoring from Trash.' ) );
@ -156,7 +156,7 @@ if ( $doaction ) {
break;
foreach ( (array) $post_ids as $post_id_del ) {
if ( !current_user_can( 'delete_post', $post_id_del ) )
wp_die( __( 'You are not allowed to delete this item.' ) );
wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
if ( !wp_delete_attachment( $post_id_del ) )
wp_die( __( 'Error in deleting.' ) );

View File

@ -77,7 +77,7 @@ if ( is_multisite()
&& $user_id != $current_user->ID
&& ! apply_filters( 'enable_edit_any_user_configuration', true )
) {
wp_die( __( 'You do not have permission to edit this user.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
}
// Execute confirmed email change. See send_confirmation_on_profile_email().
@ -110,7 +110,7 @@ case 'update':
check_admin_referer('update-user_' . $user_id);
if ( !current_user_can('edit_user', $user_id) )
wp_die(__('You do not have permission to edit this user.'));
wp_die(__('Sorry, you are not allowed to edit this user.'));
if ( IS_PROFILE_PAGE ) {
/**
@ -163,7 +163,7 @@ default:
$profileuser = get_user_to_edit($user_id);
if ( !current_user_can('edit_user', $user_id) )
wp_die(__('You do not have permission to edit this user.'));
wp_die(__('Sorry, you are not allowed to edit this user.'));
$sessions = WP_Session_Tokens::get_instance( $profileuser->ID );

View File

@ -13,14 +13,14 @@ if ( is_multisite() ) {
if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
403
);
}
} elseif ( ! current_user_can( 'create_users' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to create users.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
403
);
}
@ -53,7 +53,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
403
);
}
@ -107,7 +107,7 @@ Please click the following link to confirm the invite:
if ( ! current_user_can( 'create_users' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to create users.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
403
);
}

View File

@ -13,7 +13,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
if ( ! current_user_can( 'list_users' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to browse users.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
403
);
}

View File

@ -15,7 +15,7 @@ require_once(ABSPATH . 'wp-admin/includes/widgets.php');
if ( ! current_user_can( 'edit_theme_options' ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
403
);
}

View File

@ -387,7 +387,7 @@ final class WP_Customize_Manager {
show_admin_bar( false );
if ( ! current_user_can( 'customize' ) ) {
$this->wp_die( -1, __( 'You are not allowed to customize this site.' ) );
$this->wp_die( -1, __( 'Sorry, you are not allowed to customize this site.' ) );
}
$this->original_stylesheet = get_stylesheet();
@ -401,7 +401,7 @@ final class WP_Customize_Manager {
// If the requested theme is not the active theme and the user doesn't have the
// switch_themes cap, bail.
if ( ! current_user_can( 'switch_themes' ) ) {
$this->wp_die( -1, __( 'You are not allowed to edit theme options on this site.' ) );
$this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) );
}
// If the theme has errors while loading, bail.

View File

@ -1340,7 +1340,7 @@ class wp_xmlrpc_server extends IXR_Server {
$post_data['post_author'] = absint( $post_data['post_author'] );
if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) {
if ( ! current_user_can( $post_type->cap->edit_others_posts ) )
return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) );
$author = get_userdata( $post_data['post_author'] );
@ -1634,7 +1634,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'delete_post', $post_id ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
}
$result = wp_delete_post( $post_id );
@ -1792,7 +1792,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( $post_type->cap->edit_posts ) )
return new IXR_Error( 401, __( 'You are not allowed to edit posts in this post type.' ));
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ));
$query['post_type'] = $post_type->name;
@ -1875,7 +1875,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $content_struct['taxonomy'] );
if ( ! current_user_can( $taxonomy->cap->manage_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to create terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) );
$taxonomy = (array) $taxonomy;
@ -1962,7 +1962,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $content_struct['taxonomy'] );
if ( ! current_user_can( $taxonomy->cap->edit_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to edit terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
$taxonomy = (array) $taxonomy;
@ -2058,7 +2058,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $taxonomy );
if ( ! current_user_can( $taxonomy->cap->delete_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to delete terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete terms in this taxonomy.' ) );
$term = get_term( $term_id, $taxonomy->name );
@ -2129,7 +2129,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $taxonomy );
if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
$term = get_term( $term_id , $taxonomy->name, ARRAY_A );
@ -2187,7 +2187,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $taxonomy );
if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
$query = array();
@ -2282,7 +2282,7 @@ class wp_xmlrpc_server extends IXR_Server {
$taxonomy = get_taxonomy( $taxonomy );
if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
return $this->_prepare_taxonomy( $taxonomy, $fields );
}
@ -2470,7 +2470,7 @@ class wp_xmlrpc_server extends IXR_Server {
do_action( 'xmlrpc_call', 'wp.getUsers' );
if ( ! current_user_can( 'list_users' ) )
return new IXR_Error( 401, __( 'You are not allowed to browse users.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to browse users.' ) );
$query = array( 'fields' => 'all_with_meta' );
@ -2794,7 +2794,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Make sure the user can delete pages.
if ( !current_user_can('delete_page', $page_id) )
return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this page.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this page.' ) );
// Attempt to delete the page.
$result = wp_delete_post($page_id);
@ -2856,7 +2856,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Make sure the user is allowed to edit pages.
if ( !current_user_can('edit_page', $page_id) )
return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this page.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) );
// Mark this as content for a page.
$content['post_type'] = 'page';
@ -3053,7 +3053,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Make sure the user is allowed to add a category.
if ( !current_user_can('manage_categories') )
return new IXR_Error(401, __('Sorry, you do not have the right to add a category.'));
return new IXR_Error(401, __('Sorry, you are not allowed to add a category.'));
// If no slug was provided make it empty so that
// WordPress will generate one.
@ -3128,7 +3128,7 @@ class wp_xmlrpc_server extends IXR_Server {
do_action( 'xmlrpc_call', 'wp.deleteCategory' );
if ( !current_user_can('manage_categories') )
return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete a category.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete a category.' ) );
$status = wp_delete_term( $category_id, 'category' );
@ -3226,7 +3226,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
}
return $this->_prepare_comment( $comment );
@ -3358,7 +3358,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( !current_user_can( 'edit_comment', $comment_ID ) ) {
return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@ -3425,7 +3425,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'edit_comment', $comment_ID ) ) {
return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@ -3629,7 +3629,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'publish_posts' ) ) {
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@ -3670,7 +3670,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return new IXR_Error( 403, __( 'You are not allowed access to details of this post.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details of this post.' ) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@ -3710,7 +3710,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'edit_posts' ) )
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getPostStatusList' );
@ -3742,7 +3742,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'edit_pages' ) )
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getPageStatusList' );
@ -3774,7 +3774,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'edit_pages' ) )
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
$templates = get_page_templates();
$templates['Default'] = 'default';
@ -3868,7 +3868,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'manage_options' ) )
return new IXR_Error( 403, __( 'You are not allowed to update options.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed to update options.' ) );
$option_names = array();
foreach ( $options as $o_name => $o_value ) {
@ -3920,7 +3920,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'upload_files' ) )
return new IXR_Error( 403, __( 'You do not have permission to upload files.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed to upload files.' ) );
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getMediaItem' );
@ -3968,7 +3968,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'upload_files' ) )
return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getMediaLibrary' );
@ -4012,7 +4012,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
if ( !current_user_can( 'edit_posts' ) )
return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getPostFormats' );
@ -4682,10 +4682,10 @@ class wp_xmlrpc_server extends IXR_Server {
$this->escape($actual_post);
if ( ! current_user_can( 'edit_post', $post_ID ) ) {
return new IXR_Error(401, __('Sorry, you do not have the right to edit this post.'));
return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.'));
}
if ( 'publish' == $actual_post['post_status'] && ! current_user_can( 'publish_posts' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
}
$postdata = array();
@ -4752,7 +4752,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( ! current_user_can( 'delete_post', $post_ID ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
}
$result = wp_delete_post( $post_ID );
@ -4905,11 +4905,11 @@ class wp_xmlrpc_server extends IXR_Server {
switch ( $post_type ) {
case "post":
if ( !current_user_can( 'edit_others_posts' ) )
return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) );
break;
case "page":
if ( !current_user_can( 'edit_others_pages' ) )
return new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create pages as this user.' ) );
break;
default:
return new IXR_Error( 401, __( 'Invalid post type' ) );
@ -5186,7 +5186,7 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error( 404, __( 'Invalid post ID.' ) );
if ( ! current_user_can( 'edit_post', $post_ID ) )
return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this post.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
// Use wp.editPost to edit post types other than post and page.
if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) )
@ -5245,12 +5245,12 @@ class wp_xmlrpc_server extends IXR_Server {
switch ( $post_type ) {
case 'post':
if ( ! current_user_can( 'edit_others_posts' ) ) {
return new IXR_Error( 401, __( 'You are not allowed to change the post author as this user.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the post author as this user.' ) );
}
break;
case 'page':
if ( ! current_user_can( 'edit_others_pages' ) ) {
return new IXR_Error( 401, __( 'You are not allowed to change the page author as this user.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the page author as this user.' ) );
}
break;
default:
@ -5357,9 +5357,9 @@ class wp_xmlrpc_server extends IXR_Server {
if ( 'publish' == $post_status || 'private' == $post_status ) {
if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this page.' ) );
} elseif ( ! current_user_can( 'publish_posts' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
}
}
@ -5790,7 +5790,7 @@ class wp_xmlrpc_server extends IXR_Server {
do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' );
if ( !current_user_can('upload_files') ) {
$this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
$this->error = new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
return $this->error;
}

View File

@ -545,7 +545,7 @@ function _show_post_preview() {
$id = (int) $_GET['preview_id'];
if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
wp_die( __('You do not have permission to preview drafts.') );
wp_die( __('Sorry, you are not allowed to preview drafts.') );
add_filter('the_preview', '_set_preview');
}

View File

@ -124,7 +124,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
'noPerm' => __('You do not have permission to do that.'),
'noPerm' => __('Sorry, you are not allowed to do that.'),
'broken' => __('An unidentified error has occurred.')
) );
@ -445,7 +445,7 @@ function wp_default_scripts( &$scripts ) {
'cancel' => __( 'Cancel' ),
'close' => __( 'Close' ),
'cheatin' => __( 'Cheatin&#8217; uh?' ),
'notAllowed' => __( 'You are not allowed to customize this site.' ),
'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ),
'previewIframeTitle' => __( 'Site Preview' ),
'loginIframeTitle' => __( 'Session expired' ),
'collapseSidebar' => __( 'Collapse Sidebar' ),
@ -485,7 +485,7 @@ function wp_default_scripts( &$scripts ) {
if ( is_admin() ) {
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
'noPerm' => __('You do not have permission to do that.'),
'noPerm' => __('Sorry, you are not allowed to do that.'),
'broken' => __('An unidentified error has occurred.')
));

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37913';
$wp_version = '4.6-alpha-37914';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.