Ticket #34521: 34521.3.patch
| File 34521.3.patch, 128.6 KB (added by , 10 years ago) |
|---|
-
wp-admin/admin.php
271 271 272 272 $importer = $_GET['import']; 273 273 274 if ( ! current_user_can( 'import') )275 wp_die(__(' You are not allowed to import.'));274 if ( ! current_user_can( 'import' ) ) 275 wp_die(__('Sorry, you are not allowed to import.')); 276 276 277 277 if ( validate_file($importer) ) { 278 278 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); -
wp-admin/async-upload.php
45 45 } 46 46 47 47 if ( ! current_user_can( 'upload_files' ) ) { 48 wp_die( __( ' You do not have permissionto upload files.' ) );48 wp_die( __( 'Sorry, you are not allowed to upload files.' ) ); 49 49 } 50 50 51 51 // just fetch the detail form for that attachment … … 54 54 if ( 'attachment' != $post->post_type ) 55 55 wp_die( __( 'Unknown post type.' ) ); 56 56 if ( ! current_user_can( 'edit_post', $id ) ) 57 wp_die( __( ' You are not allowed to edit this item.' ) );57 wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); 58 58 59 59 switch ( $_REQUEST['fetch'] ) { 60 60 case 3 : -
wp-admin/comment.php
61 61 comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') ); 62 62 63 63 if ( !current_user_can( 'edit_comment', $comment_id ) ) 64 comment_footer_die( __(' You are not allowed to edit this comment.') );64 comment_footer_die( __('Sorry, you are not allowed to edit this comment.') ); 65 65 66 66 if ( 'trash' == $comment->comment_approved ) 67 67 comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); … … 254 254 if ( !$comment = get_comment($comment_id) ) 255 255 comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') ); 256 256 if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) 257 comment_footer_die( __(' You are not allowed to edit comments on this post.') );257 comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') ); 258 258 259 259 if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') ) 260 260 $redir = wp_get_referer(); -
wp-admin/custom-background.php
464 464 * @deprecated 3.5.0 465 465 */ 466 466 public function wp_set_background_image() { 467 if ( ! current_user_can( 'edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit;467 if ( ! current_user_can( 'edit_theme_options' ) || ! isset( $_POST['attachment_id'] ) ) exit; 468 468 $attachment_id = absint($_POST['attachment_id']); 469 469 /** This filter is documented in wp-admin/includes/media.php */ 470 470 $sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) )); -
wp-admin/custom-header.php
188 188 * @since 2.6.0 189 189 */ 190 190 public function take_action() { 191 if ( ! current_user_can( 'edit_theme_options') )191 if ( ! current_user_can( 'edit_theme_options' ) ) 192 192 return; 193 193 194 194 if ( empty( $_POST ) ) … … 965 965 * @since 2.1.0 966 966 */ 967 967 public function admin_page() { 968 if ( ! current_user_can( 'edit_theme_options') )969 wp_die(__(' You do not have permissionto customize headers.'));968 if ( ! current_user_can( 'edit_theme_options' ) ) 969 wp_die(__('Sorry, you are not allowed to customize headers.')); 970 970 $step = $this->step(); 971 971 if ( 2 == $step ) 972 972 $this->step_2(); -
wp-admin/customize.php
15 15 if ( ! current_user_can( 'customize' ) ) { 16 16 wp_die( 17 17 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 18 '<p>' . __( ' You are not allowed to customize this site.' ) . '</p>',18 '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>', 19 19 403 20 20 ); 21 21 } -
wp-admin/edit-comments.php
11 11 if ( ! current_user_can( 'edit_posts' ) ) { 12 12 wp_die( 13 13 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 14 '<p>' . __( ' You are not allowed to edit comments.' ) . '</p>',14 '<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>', 15 15 403 16 16 ); 17 17 } … … 210 210 $error_msg = __( 'Invalid comment ID.' ); 211 211 break; 212 212 case 2 : 213 $error_msg = __( ' You are not allowed to edit comments on this post.' );213 $error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' ); 214 214 break; 215 215 } 216 216 if ( $error_msg ) -
wp-admin/edit-tags.php
18 18 wp_die( __( 'Invalid taxonomy' ) ); 19 19 20 20 if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { 21 wp_die( __( ' You are not allowed to manage these items.' ) );21 wp_die( __( 'Sorry, you are not allowed to manage these items.' ) ); 22 22 } 23 23 24 24 if ( ! current_user_can( $tax->cap->manage_terms ) ) { 25 25 wp_die( 26 26 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 27 '<p>' . __( ' You are not allowed to manage these items.' ) . '</p>',27 '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>', 28 28 403 29 29 ); 30 30 } … … 71 71 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 72 72 wp_die( 73 73 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 74 '<p>' . __( ' You are not allowed to add this item.' ) . '</p>',74 '<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>', 75 75 403 76 76 ); 77 77 } … … 111 111 if ( ! current_user_can( $tax->cap->delete_terms ) ) { 112 112 wp_die( 113 113 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 114 '<p>' . __( ' You are not allowed to delete this item.' ) . '</p>',114 '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>', 115 115 403 116 116 ); 117 117 } … … 128 128 if ( ! current_user_can( $tax->cap->delete_terms ) ) { 129 129 wp_die( 130 130 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 131 '<p>' . __( ' You are not allowed to delete these items.' ) . '</p>',131 '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>', 132 132 403 133 133 ); 134 134 } … … 171 171 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 172 172 wp_die( 173 173 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 174 '<p>' . __( ' You are not allowed to edit this item.' ) . '</p>',174 '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>', 175 175 403 176 176 ); 177 177 } … … 288 288 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 289 289 wp_die( 290 290 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 291 '<p>' . __( ' You are not allowed to edit this item.' ) . '</p>',291 '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>', 292 292 403 293 293 ); 294 294 } -
wp-admin/edit.php
13 13 wp_die( __( 'Invalid post type' ) ); 14 14 15 15 if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) { 16 wp_die( __( ' You are not allowed to edit posts in this post type.' ) );16 wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); 17 17 } 18 18 19 19 if ( 'attachment' === $typenow ) { … … 37 37 if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { 38 38 wp_die( 39 39 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 40 '<p>' . __( ' You are not allowed to edit posts in this post type.' ) . '</p>',40 '<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>', 41 41 403 42 42 ); 43 43 } … … 103 103 104 104 foreach ( (array) $post_ids as $post_id ) { 105 105 if ( !current_user_can( 'delete_post', $post_id) ) 106 wp_die( __(' You are not allowed to move this item to the Trash.') );106 wp_die( __('Sorry, you are not allowed to move this item to the Trash.') ); 107 107 108 108 if ( wp_check_post_lock( $post_id ) ) { 109 109 $locked++; … … 122 122 $untrashed = 0; 123 123 foreach ( (array) $post_ids as $post_id ) { 124 124 if ( !current_user_can( 'delete_post', $post_id) ) 125 wp_die( __(' You are not allowed to restore this item from the Trash.') );125 wp_die( __('Sorry, you are not allowed to restore this item from the Trash.') ); 126 126 127 127 if ( !wp_untrash_post($post_id) ) 128 128 wp_die( __('Error in restoring from Trash.') ); … … 137 137 $post_del = get_post($post_id); 138 138 139 139 if ( !current_user_can( 'delete_post', $post_id ) ) 140 wp_die( __(' You are not allowed to delete this item.') );140 wp_die( __('Sorry, you are not allowed to delete this item.') ); 141 141 142 142 if ( $post_del->post_type == 'attachment' ) { 143 143 if ( ! wp_delete_attachment($post_id) ) -
wp-admin/export.php
9 9 /** Load WordPress Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( !current_user_can( 'export') )13 wp_die(__(' You do not have sufficient permissionsto export the content of this site.'));12 if ( !current_user_can( 'export' ) ) 13 wp_die(__('Sorry, you are not allowed to export the content of this site.')); 14 14 15 15 /** Load WordPress export API */ 16 16 require_once( ABSPATH . 'wp-admin/includes/export.php' ); -
wp-admin/import.php
11 11 /** Load WordPress Bootstrap */ 12 12 require_once( dirname( __FILE__ ) . '/admin.php' ); 13 13 14 if ( !current_user_can( 'import') )15 wp_die(__(' You do not have sufficient permissionsto import content in this site.'));14 if ( !current_user_can( 'import' ) ) 15 wp_die(__('Sorry, you are not allowed to import content in this site.')); 16 16 17 17 $title = __('Import'); 18 18 … … 124 124 <?php 125 125 } 126 126 127 if ( current_user_can( 'install_plugins') )127 if ( current_user_can( 'install_plugins' ) ) 128 128 echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>'; 129 129 ?> 130 130 -
wp-admin/includes/ajax-actions.php
1321 1321 $action = 'add-user'; 1322 1322 1323 1323 check_ajax_referer( $action ); 1324 if ( ! current_user_can( 'create_users') )1324 if ( ! current_user_can( 'create_users' ) ) 1325 1325 wp_die( -1 ); 1326 1326 if ( ! $user_id = edit_user() ) { 1327 1327 wp_die( 0 ); … … 1605 1605 1606 1606 if ( 'page' == $_POST['post_type'] ) { 1607 1607 if ( ! current_user_can( 'edit_page', $post_ID ) ) 1608 wp_die( __( ' You are not allowed to edit this page.' ) );1608 wp_die( __( 'Sorry, you are not allowed to edit this page.' ) ); 1609 1609 } else { 1610 1610 if ( ! current_user_can( 'edit_post', $post_ID ) ) 1611 wp_die( __( ' You are not allowed to edit this post.' ) );1611 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 1612 1612 } 1613 1613 1614 1614 if ( $last = wp_check_post_lock( $post_ID ) ) { … … 1812 1812 function wp_ajax_widgets_order() { 1813 1813 check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); 1814 1814 1815 if ( !current_user_can( 'edit_theme_options') )1815 if ( !current_user_can( 'edit_theme_options' ) ) 1816 1816 wp_die( -1 ); 1817 1817 1818 1818 unset( $_POST['savewidgets'], $_POST['action'] ); … … 1854 1854 1855 1855 check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); 1856 1856 1857 if ( !current_user_can( 'edit_theme_options') || !isset($_POST['id_base']) )1857 if ( !current_user_can( 'edit_theme_options' ) || !isset($_POST['id_base']) ) 1858 1858 wp_die( -1 ); 1859 1859 1860 1860 unset( $_POST['savewidgets'], $_POST['action'] ); … … 2001 2001 echo wp_json_encode( array( 2002 2002 'success' => false, 2003 2003 'data' => array( 2004 'message' => __( ' You do not have permissionto upload files.' ),2004 'message' => __( 'Sorry, you are not allowed to upload files.' ), 2005 2005 'filename' => $_FILES['async-upload']['name'], 2006 2006 ) 2007 2007 ) ); … … 2015 2015 echo wp_json_encode( array( 2016 2016 'success' => false, 2017 2017 'data' => array( 2018 'message' => __( " You don't have permissionto attach files to this post." ),2018 'message' => __( "Sorry, you are not allowed to attach files to this post." ), 2019 2019 'filename' => $_FILES['async-upload']['name'], 2020 2020 ) 2021 2021 ) ); … … 3090 3090 } 3091 3091 3092 3092 if ( ! current_user_can( 'update_plugins' ) ) { 3093 $status['error'] = __( ' You do not have sufficient permissionsto update plugins for this site.' );3093 $status['error'] = __( 'Sorry, you are not allowed to update plugins for this site.' ); 3094 3094 wp_send_json_error( $status ); 3095 3095 } 3096 3096 -
wp-admin/includes/bookmark.php
29 29 if ( ! current_user_can( 'manage_links' ) ) { 30 30 wp_die( 31 31 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 32 '<p>' . __( ' You do not have sufficient permissionsto edit the links for this site.' ) . '</p>',32 '<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>', 33 33 403 34 34 ); 35 35 } … … 312 312 wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) ); 313 313 } 314 314 315 wp_die( __( ' You do not have sufficient permissionsto edit the links for this site.' ) );315 wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) ); 316 316 } -
wp-admin/includes/class-wp-comments-list-table.php
64 64 * @return bool 65 65 */ 66 66 public function ajax_user_can() { 67 return current_user_can( 'edit_posts');67 return current_user_can( 'edit_posts' ); 68 68 } 69 69 70 70 /** -
wp-admin/includes/class-wp-media-list-table.php
58 58 * @return bool 59 59 */ 60 60 public function ajax_user_can() { 61 return current_user_can( 'upload_files');61 return current_user_can( 'upload_files' ); 62 62 } 63 63 64 64 /** -
wp-admin/includes/class-wp-ms-themes-list-table.php
443 443 ); 444 444 } 445 445 446 if ( current_user_can( 'edit_themes') ) {446 if ( current_user_can( 'edit_themes' ) ) { 447 447 $url = add_query_arg( array( 448 448 'theme' => $theme_key, 449 449 ), 'theme-editor.php' ); -
wp-admin/includes/class-wp-plugin-install-list-table.php
28 28 * @return bool 29 29 */ 30 30 public function ajax_user_can() { 31 return current_user_can( 'install_plugins');31 return current_user_can( 'install_plugins' ); 32 32 } 33 33 34 34 /** -
wp-admin/includes/class-wp-plugins-list-table.php
59 59 * @return bool 60 60 */ 61 61 public function ajax_user_can() { 62 return current_user_can( 'activate_plugins');62 return current_user_can( 'activate_plugins' ); 63 63 } 64 64 65 65 /** -
wp-admin/includes/comment.php
46 46 */ 47 47 function edit_comment() { 48 48 if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) ) 49 wp_die ( __( ' You are not allowed to edit comments on this post.' ) );49 wp_die ( __( 'Sorry, you are not allowed to edit comments on this post.' ) ); 50 50 51 51 if ( isset( $_POST['newcomment_author'] ) ) 52 52 $_POST['comment_author'] = $_POST['newcomment_author']; -
wp-admin/includes/dashboard.php
35 35 } 36 36 37 37 // Right Now 38 if ( is_blog_admin() && current_user_can( 'edit_posts') )38 if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) 39 39 wp_add_dashboard_widget( 'dashboard_right_now', __( 'At a Glance' ), 'wp_dashboard_right_now' ); 40 40 41 41 if ( is_network_admin() ) … … 376 376 */ 377 377 function wp_network_dashboard_right_now() { 378 378 $actions = array(); 379 if ( current_user_can( 'create_sites') )379 if ( current_user_can( 'create_sites' ) ) 380 380 $actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( 'Create a New Site' ) . '</a>'; 381 if ( current_user_can( 'create_users') )381 if ( current_user_can( 'create_users' ) ) 382 382 $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>'; 383 383 384 384 $c_users = get_user_count(); -
wp-admin/includes/file.php
200 200 /** 201 201 * Make sure that the file that was requested to edit, is allowed to be edited 202 202 * 203 * Function will die if you are not allowed to edit the file203 * Function will die if Sorry, you are not allowed to edit the file 204 204 * 205 205 * @since 1.5.0 206 206 * -
wp-admin/includes/media.php
3110 3110 } 3111 3111 3112 3112 if ( ! current_user_can( 'edit_post', $parent_id ) ) { 3113 wp_die( __( ' You are not allowed to edit this post.' ) );3113 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 3114 3114 } 3115 3115 $ids = array(); 3116 3116 foreach ( (array) $_REQUEST['media'] as $att_id ) { -
wp-admin/includes/menu.php
339 339 */ 340 340 do_action( 'admin_page_access_denied' ); 341 341 342 wp_die( __( ' You do not have sufficient permissionsto access this page.' ), 403 );342 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 343 343 } 344 344 345 345 $menu = add_menu_classes($menu); -
wp-admin/includes/meta-boxes.php
902 902 ?> 903 903 <div id="delete-action"> 904 904 <?php 905 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can( 'manage_links') ) { ?>905 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) { ?> 906 906 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a> 907 907 <?php } ?> 908 908 </div> -
wp-admin/includes/network.php
119 119 $hostname = get_clean_basedomain(); 120 120 $has_ports = strstr( $hostname, ':' ); 121 121 if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { 122 echo '<div class="error"><p><strong>' . __( 'ERROR:') . '</strong> ' . __( ' You cannotinstall a network of sites with your server address.' ) . '</p></div>';122 echo '<div class="error"><p><strong>' . __( 'ERROR:') . '</strong> ' . __( 'Sorry, you are not allowed to install a network of sites with your server address.' ) . '</p></div>'; 123 123 echo '<p>' . sprintf( 124 124 /* translators: %s: port number */ 125 __( ' You cannotuse port numbers such as %s.' ),125 __( 'Sorry, you are not allowed to use port numbers such as %s.' ), 126 126 '<code>' . $has_ports . '</code>' 127 127 ) . '</p>'; 128 128 echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>'; … … 190 190 if ( allow_subdomain_install() && allow_subdirectory_install() ) : ?> 191 191 <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3> 192 192 <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.' ); ?> 193 <strong><?php _e( ' You cannotchange this later.' ); ?></strong></p>193 <strong><?php _e( 'Sorry, you are not allowed to change this later.' ); ?></strong></p> 194 194 <p><?php _e( 'You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.' ); ?></p> 195 195 <?php // @todo: Link to an MS readme? ?> 196 196 <table class="form-table"> -
wp-admin/includes/plugin-install.php
380 380 $status = 'update_available'; 381 381 $update_file = $file; 382 382 $version = $plugin->new_version; 383 if ( current_user_can( 'update_plugins') )383 if ( current_user_can( 'update_plugins' ) ) 384 384 $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file); 385 385 break; 386 386 } … … 391 391 if ( is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) { 392 392 $installed_plugin = get_plugins('/' . $api->slug); 393 393 if ( empty($installed_plugin) ) { 394 if ( current_user_can( 'install_plugins') )394 if ( current_user_can( 'install_plugins' ) ) 395 395 $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 396 396 } else { 397 397 $key = array_keys( $installed_plugin ); … … 413 413 } 414 414 } else { 415 415 // "install" & no directory with that slug 416 if ( current_user_can( 'install_plugins') )416 if ( current_user_can( 'install_plugins' ) ) 417 417 $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 418 418 } 419 419 } -
wp-admin/includes/plugin.php
1277 1277 * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required. 1278 1278 */ 1279 1279 function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 1280 if ( current_user_can( 'edit_users') )1280 if ( current_user_can( 'edit_users' ) ) 1281 1281 $parent = 'users.php'; 1282 1282 else 1283 1283 $parent = 'profile.php'; -
wp-admin/includes/post.php
30 30 31 31 if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) { 32 32 if ( 'page' == $post_data['post_type'] ) 33 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to edit pages as this user.' ) );33 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 34 34 else 35 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to edit posts as this user.' ) );35 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 36 36 } elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) { 37 37 if ( 'page' == $post_data['post_type'] ) 38 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to create pages as this user.' ) );38 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) ); 39 39 else 40 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to create posts as this user.' ) );40 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) ); 41 41 } 42 42 43 43 if ( isset( $post_data['content'] ) ) … … 68 68 && ! current_user_can( $ptype->cap->edit_others_posts ) ) { 69 69 if ( $update ) { 70 70 if ( 'page' == $post_data['post_type'] ) 71 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to edit pages as this user.' ) );71 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 72 72 else 73 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to edit posts as this user.' ) );73 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 74 74 } else { 75 75 if ( 'page' == $post_data['post_type'] ) 76 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to create pages as this user.' ) );76 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) ); 77 77 else 78 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to create posts as this user.' ) );78 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) ); 79 79 } 80 80 } 81 81 … … 203 203 $ptype = get_post_type_object($post_data['post_type']); 204 204 if ( !current_user_can( 'edit_post', $post_ID ) ) { 205 205 if ( 'page' == $post_data['post_type'] ) 206 wp_die( __(' You are not allowed to edit this page.' ));206 wp_die( __('Sorry, you are not allowed to edit this page.' )); 207 207 else 208 wp_die( __(' You are not allowed to edit this post.' ));208 wp_die( __('Sorry, you are not allowed to edit this post.' )); 209 209 } 210 210 211 211 if ( post_type_supports( $ptype->name, 'revisions' ) ) { … … 421 421 422 422 if ( !current_user_can( $ptype->cap->edit_posts ) ) { 423 423 if ( 'page' == $ptype->name ) 424 wp_die( __(' You are not allowed to edit pages.'));424 wp_die( __('Sorry, you are not allowed to edit pages.')); 425 425 else 426 wp_die( __(' You are not allowed to edit posts.'));426 wp_die( __('Sorry, you are not allowed to edit posts.')); 427 427 } 428 428 429 429 if ( -1 == $post_data['_status'] ) { … … 714 714 715 715 if ( !current_user_can( $ptype->cap->edit_posts ) ) { 716 716 if ( 'page' == $ptype->name ) 717 return new WP_Error( 'edit_pages', __( ' You are not allowed to create pages on this site.' ) );717 return new WP_Error( 'edit_pages', __( 'Sorry, you are not allowed to create pages on this site.' ) ); 718 718 else 719 return new WP_Error( 'edit_posts', __( ' You are not allowed to create posts or drafts on this site.' ) );719 return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) ); 720 720 } 721 721 722 722 $_POST['post_mime_type'] = ''; … … 1717 1717 $_POST['ID'] = $post_ID; 1718 1718 1719 1719 if ( ! $post = get_post( $post_ID ) ) { 1720 wp_die( __( ' You are not allowed to edit this post.' ) );1720 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 1721 1721 } 1722 1722 1723 1723 if ( ! current_user_can( 'edit_post', $post->ID ) ) { 1724 wp_die( __( ' You are not allowed to edit this post.' ) );1724 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 1725 1725 } 1726 1726 1727 1727 $is_autosave = false; … … 1779 1779 $post = get_post( $post_id ); 1780 1780 1781 1781 if ( ! current_user_can( 'edit_post', $post->ID ) ) { 1782 return new WP_Error( 'edit_posts', __( ' You are not allowed to edit this item.' ) );1782 return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to edit this item.' ) ); 1783 1783 } 1784 1784 1785 1785 if ( 'auto-draft' == $post->post_status ) -
wp-admin/includes/theme.php
149 149 function get_theme_update_available( $theme ) { 150 150 static $themes_update = null; 151 151 152 if ( !current_user_can( 'update_themes' ) )152 if ( !current_user_can( 'update_themes' ) ) 153 153 return false; 154 154 155 155 if ( !isset($themes_update) ) … … 170 170 $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); 171 171 172 172 if ( !is_multisite() ) { 173 if ( ! current_user_can( 'update_themes') ) {173 if ( ! current_user_can( 'update_themes' ) ) { 174 174 /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */ 175 175 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.' ) . '</strong></p>', 176 176 $theme_name, -
wp-admin/includes/update.php
182 182 * @return string 183 183 */ 184 184 function core_update_footer( $msg = '' ) { 185 if ( !current_user_can( 'update_core') )185 if ( !current_user_can( 'update_core' ) ) 186 186 return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 187 187 188 188 $cur = get_preferred_from_update_core(); … … 217 217 * @return false|void 218 218 */ 219 219 function update_nag() { 220 if ( is_multisite() && !current_user_can( 'update_core') )220 if ( is_multisite() && !current_user_can( 'update_core' ) ) 221 221 return false; 222 222 223 223 global $pagenow; … … 230 230 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) 231 231 return false; 232 232 233 if ( current_user_can( 'update_core') ) {233 if ( current_user_can( 'update_core' ) ) { 234 234 $msg = sprintf( __( '<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s" aria-label="Please update WordPress now">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) ); 235 235 } else { 236 236 $msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); … … 247 247 248 248 $msg = ''; 249 249 250 if ( current_user_can( 'update_core') ) {250 if ( current_user_can( 'update_core' ) ) { 251 251 $cur = get_preferred_from_update_core(); 252 252 253 253 if ( isset( $cur->response ) && $cur->response == 'upgrade' ) … … 296 296 * @since 2.9.0 297 297 */ 298 298 function wp_plugin_update_rows() { 299 if ( !current_user_can( 'update_plugins' ) )299 if ( !current_user_can( 'update_plugins' ) ) 300 300 return; 301 301 302 302 $plugins = get_site_transient( 'update_plugins' ); … … 432 432 * @since 3.1.0 433 433 */ 434 434 function wp_theme_update_rows() { 435 if ( !current_user_can( 'update_themes' ) )435 if ( !current_user_can( 'update_themes' ) ) 436 436 return; 437 437 438 438 $themes = get_site_transient( 'update_themes' ); … … 467 467 $active = $theme->is_allowed( 'network' ) ? ' active': ''; 468 468 469 469 echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">'; 470 if ( ! current_user_can( 'update_themes') ) {470 if ( ! current_user_can( 'update_themes' ) ) { 471 471 /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */ 472 472 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.'), 473 473 $theme_name, … … 550 550 if ( ! $nag ) 551 551 return false; 552 552 553 if ( current_user_can( 'update_core') )553 if ( current_user_can( 'update_core' ) ) 554 554 $msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' ); 555 555 else 556 556 $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.'); -
wp-admin/install.php
233 233 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 234 234 235 235 if ( !$mysql_compat && !$php_compat ) 236 $compat = sprintf( __( ' You cannotinstall because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );236 $compat = sprintf( __( 'Sorry, you are not allowed to install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); 237 237 elseif ( !$php_compat ) 238 $compat = sprintf( __( ' You cannotinstall because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );238 $compat = sprintf( __( 'Sorry, you are not allowed to install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); 239 239 elseif ( !$mysql_compat ) 240 $compat = sprintf( __( ' You cannotinstall because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );240 $compat = sprintf( __( 'Sorry, you are not allowed to install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); 241 241 242 242 if ( !$mysql_compat || !$php_compat ) { 243 243 display_header(); -
wp-admin/link-add.php
9 9 /** Load WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( ! current_user_can( 'manage_links') )13 wp_die(__(' You do not have sufficient permissionsto add links to this site.'));12 if ( ! current_user_can( 'manage_links' ) ) 13 wp_die(__('Sorry, you are not allowed to add links to this site.')); 14 14 15 15 $title = __('Add New Link'); 16 16 $parent_file = 'link-manager.php'; -
wp-admin/link-manager.php
9 9 /** Load WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 if ( ! current_user_can( 'manage_links' ) ) 12 wp_die( __( ' You do not have sufficient permissionsto edit the links for this site.' ) );12 wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) ); 13 13 14 14 $wp_list_table = _get_list_table('WP_Links_List_Table'); 15 15 … … 67 67 68 68 include_once( ABSPATH . 'wp-admin/admin-header.php' ); 69 69 70 if ( ! current_user_can( 'manage_links') )71 wp_die(__(" You do not have sufficient permissionsto edit the links for this site."));70 if ( ! current_user_can( 'manage_links' ) ) 71 wp_die(__("Sorry, you are not allowed to edit the links for this site.")); 72 72 73 73 ?> 74 74 -
wp-admin/link.php
14 14 15 15 wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) ); 16 16 17 if ( ! current_user_can( 'manage_links') )17 if ( ! current_user_can( 'manage_links' ) ) 18 18 wp_link_manager_disabled_message(); 19 19 20 20 if ( !empty($_POST['deletebookmarks']) ) -
wp-admin/media-new.php
12 12 /** Load WordPress Administration Bootstrap */ 13 13 require_once( dirname( __FILE__ ) . '/admin.php' ); 14 14 15 if (!current_user_can( 'upload_files'))16 wp_die(__(' You do not have permissionto upload files.'));15 if (!current_user_can( 'upload_files' )) 16 wp_die(__('Sorry, you are not allowed to upload files.')); 17 17 18 18 wp_enqueue_script('plupload-handlers'); 19 19 -
wp-admin/media-upload.php
16 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 17 17 18 18 if ( ! current_user_can( 'upload_files' ) ) { 19 wp_die( __( ' You do not have permissionto upload files.' ), 403 );19 wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 ); 20 20 } 21 21 22 22 wp_enqueue_script('plupload-handlers'); … … 43 43 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) { 44 44 wp_die( 45 45 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 46 '<p>' . __( ' You are not allowed to edit this item.' ) . '</p>',46 '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>', 47 47 403 48 48 ); 49 49 } -
wp-admin/media.php
20 20 check_admin_referer('media-form'); 21 21 22 22 if ( !current_user_can('edit_post', $attachment_id) ) 23 wp_die ( __(' You are not allowed to edit this attachment.') );23 wp_die ( __('Sorry, you are not allowed to edit this attachment.') ); 24 24 25 25 $errors = media_upload_form_handler(); 26 26 … … 54 54 $att_id = (int) $_GET['attachment_id']; 55 55 56 56 if ( !current_user_can('edit_post', $att_id) ) 57 wp_die ( __(' You are not allowed to edit this attachment.') );57 wp_die ( __('Sorry, you are not allowed to edit this attachment.') ); 58 58 59 59 $att = get_post($att_id); 60 60 -
wp-admin/menu.php
211 211 212 212 unset( $update_data ); 213 213 214 if ( current_user_can( 'list_users') )214 if ( current_user_can( 'list_users' ) ) 215 215 $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' ); 216 216 else 217 217 $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' ); 218 218 219 if ( current_user_can( 'list_users') ) {219 if ( current_user_can( 'list_users' ) ) { 220 220 $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. 221 221 $submenu['users.php'][5] = array(__('All Users'), 'list_users', 'users.php'); 222 222 if ( current_user_can( 'create_users' ) ) { -
wp-admin/ms-delete-site.php
13 13 wp_die( __( 'Multisite support is not enabled.' ) ); 14 14 15 15 if ( ! current_user_can( 'delete_site' ) ) 16 wp_die(__( ' You do not have sufficient permissionsto delete this site.'));16 wp_die(__( 'Sorry, you are not allowed to delete this site.')); 17 17 18 18 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) { 19 19 if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) { -
wp-admin/my-sites.php
12 12 if ( !is_multisite() ) 13 13 wp_die( __( 'Multisite support is not enabled.' ) ); 14 14 15 if ( ! current_user_can( 'read') )16 wp_die( __( ' You do not have sufficient permissionsto access this page.' ) );15 if ( ! current_user_can( 'read' ) ) 16 wp_die( __( 'Sorry, you are not allowed to access this page.' ) ); 17 17 18 18 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; 19 19 -
wp-admin/nav-menus.php
22 22 if ( ! current_user_can( 'edit_theme_options' ) ) { 23 23 wp_die( 24 24 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 25 '<p>' . __( ' You are not allowed to edit theme options on this site.' ) . '</p>',25 '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>', 26 26 403 27 27 ); 28 28 } -
wp-admin/network.php
16 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 17 17 18 18 if ( ! is_super_admin() ) { 19 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );19 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 20 20 } 21 21 22 22 if ( is_multisite() ) { -
wp-admin/network/index.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_network' ) ) 20 wp_die( __( ' You do not have permissionto access this page.' ), 403 );20 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 21 21 22 22 $title = __( 'Dashboard' ); 23 23 $parent_file = 'index.php'; -
wp-admin/network/settings.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_network_options' ) ) 20 wp_die( __( ' You do not have permissionto access this page.' ), 403 );20 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 21 21 22 22 $title = __( 'Network Settings' ); 23 23 $parent_file = 'settings.php'; -
wp-admin/network/site-info.php
15 15 } 16 16 17 17 if ( ! current_user_can( 'manage_sites' ) ) { 18 wp_die( __( ' You do not have sufficient permissionsto edit this site.' ) );18 wp_die( __( 'Sorry, you are not allowed to edit this site.' ) ); 19 19 } 20 20 21 21 get_current_screen()->add_help_tab( array( … … 26 26 '<p>' . __( '<strong>Info</strong> — The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.' ) . '</p>' . 27 27 '<p>' . __( '<strong>Users</strong> — This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.' ) . '</p>' . 28 28 '<p>' . sprintf( __( '<strong>Themes</strong> — This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site’s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' . 29 '<p>' . __( '<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannotmodify these values due to the way the setting is stored in the database.' ) . '</p>'29 '<p>' . __( '<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. Sorry, you are not allowed to modify these values due to the way the setting is stored in the database.' ) . '</p>' 30 30 ) ); 31 31 32 32 get_current_screen()->set_help_sidebar( … … 47 47 } 48 48 49 49 if ( ! can_edit_network( $details->site_id ) ) { 50 wp_die( __( ' You do not have permissionto access this page.' ), 403 );50 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 51 51 } 52 52 53 53 $parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME ); -
wp-admin/network/site-new.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_sites' ) ) 20 wp_die( __( ' You do not have sufficient permissionsto add sites to this network.' ) );20 wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) ); 21 21 22 22 get_current_screen()->add_help_tab( array( 23 23 'id' => 'overview', -
wp-admin/network/site-settings.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( ' You do not have sufficient permissionsto edit this site.' ) );17 wp_die( __( 'Sorry, you are not allowed to edit this site.' ) ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 24 24 '<p>' . __('<strong>Info</strong> — The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' . 25 25 '<p>' . __('<strong>Users</strong> — This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' . 26 26 '<p>' . sprintf( __('<strong>Themes</strong> — This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site’s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' . 27 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannotmodify these values due to the way the setting is stored in the database.') . '</p>'27 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. Sorry, you are not allowed to modify these values due to the way the setting is stored in the database.') . '</p>' 28 28 ) ); 29 29 30 30 get_current_screen()->set_help_sidebar( … … 44 44 } 45 45 46 46 if ( !can_edit_network( $details->site_id ) ) 47 wp_die( __( ' You do not have permissionto access this page.' ), 403 );47 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 48 48 49 49 $is_main_site = is_main_site( $id ); 50 50 -
wp-admin/network/site-themes.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( ' You do not have sufficient permissionsto manage themes for this site.' ) );17 wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 24 24 '<p>' . __('<strong>Info</strong> — The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' . 25 25 '<p>' . __('<strong>Users</strong> — This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' . 26 26 '<p>' . sprintf( __('<strong>Themes</strong> — This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site’s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' . 27 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannotmodify these values due to the way the setting is stored in the database.') . '</p>'27 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. Sorry, you are not allowed to modify these values due to the way the setting is stored in the database.') . '</p>' 28 28 ) ); 29 29 30 30 get_current_screen()->set_help_sidebar( … … 67 67 } 68 68 69 69 if ( !can_edit_network( $details->site_id ) ) 70 wp_die( __( ' You do not have permissionto access this page.' ), 403 );70 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 71 71 72 72 $is_main_site = is_main_site( $id ); 73 73 -
wp-admin/network/site-users.php
13 13 if ( ! is_multisite() ) 14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 if ( ! current_user_can( 'manage_sites') )17 wp_die(__(' You do not have sufficient permissionsto edit this site.'));16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die(__('Sorry, you are not allowed to edit this site.')); 18 18 19 19 $wp_list_table = _get_list_table('WP_Users_List_Table'); 20 20 $wp_list_table->prepare_items(); … … 27 27 '<p>' . __('<strong>Info</strong> — The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' . 28 28 '<p>' . __('<strong>Users</strong> — This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' . 29 29 '<p>' . sprintf( __('<strong>Themes</strong> — This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site’s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' . 30 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannotmodify these values due to the way the setting is stored in the database.') . '</p>'30 '<p>' . __('<strong>Settings</strong> — This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. Sorry, you are not allowed to modify these values due to the way the setting is stored in the database.') . '</p>' 31 31 ) ); 32 32 33 33 get_current_screen()->set_help_sidebar( … … 60 60 } 61 61 62 62 if ( ! can_edit_network( $details->site_id ) ) 63 wp_die( __( ' You do not have permissionto access this page.' ), 403 );63 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 64 64 65 65 $is_main_site = is_main_site( $id ); 66 66 -
wp-admin/network/sites.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( ' You do not have permissionto access this page.' ), 403 );17 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' ); 20 20 $pagenum = $wp_list_table->get_pagenum(); … … 91 91 } 92 92 93 93 if ( $current_site->blog_id == $id ) { 94 wp_die( __( ' You are not allowed to change the current site.' ) );94 wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); 95 95 } 96 96 97 97 $site_details = get_blog_details( $id ); … … 126 126 127 127 case 'deleteblog': 128 128 if ( ! current_user_can( 'delete_sites' ) ) 129 wp_die( __( ' You do not have permissionto access this page.' ), '', array( 'response' => 403 ) );129 wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) ); 130 130 131 131 $updated_action = 'not_deleted'; 132 132 if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) { … … 144 144 switch ( $doaction ) { 145 145 case 'delete': 146 146 if ( ! current_user_can( 'delete_site', $val ) ) 147 wp_die( __( ' You are not allowed to delete the site.' ) );147 wp_die( __( 'Sorry, you are not allowed to delete the site.' ) ); 148 148 149 149 $updated_action = 'all_delete'; 150 150 wpmu_delete_blog( $val, true ); … … 157 157 break; 158 158 } 159 159 } else { 160 wp_die( __( ' You are not allowed to change the current site.' ) );160 wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); 161 161 } 162 162 } 163 163 } else { … … 237 237 $msg = __( 'Site deleted.' ); 238 238 break; 239 239 case 'not_deleted': 240 $msg = __( ' You do not have permissionto delete that site.' );240 $msg = __( 'Sorry, you are not allowed to delete that site.' ); 241 241 break; 242 242 case 'archiveblog': 243 243 $msg = __( 'Site archived.' ); -
wp-admin/network/themes.php
13 13 if ( ! is_multisite() ) 14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 if ( !current_user_can( 'manage_network_themes') )17 wp_die( __( ' You do not have sufficient permissionsto manage network themes.' ) );16 if ( !current_user_can( 'manage_network_themes' ) ) 17 wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) ); 18 18 19 19 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); 20 20 $pagenum = $wp_list_table->get_pagenum(); … … 90 90 exit; 91 91 case 'delete-selected': 92 92 if ( ! current_user_can( 'delete_themes' ) ) { 93 wp_die( __(' You do not have sufficient permissionsto delete themes for this site.') );93 wp_die( __('Sorry, you are not allowed to delete themes for this site.') ); 94 94 } 95 95 96 96 check_admin_referer( 'bulk-themes' ); … … 235 235 ?> 236 236 237 237 <div class="wrap"> 238 <h1><?php echo esc_html( $title ); if ( current_user_can( 'install_themes') ) { ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }238 <h1><?php echo esc_html( $title ); if ( current_user_can( 'install_themes' ) ) { ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } 239 239 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { 240 240 /* translators: %s: search keywords */ 241 241 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) ); … … 271 271 } elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) { 272 272 echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>'; 273 273 } elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) { 274 echo '<div class="error notice is-dismissible"><p>' . __( ' You cannotdelete a theme while it is active on the main site.' ) . '</p></div>';274 echo '<div class="error notice is-dismissible"><p>' . __( 'Sorry, you are not allowed to delete a theme while it is active on the main site.' ) . '</p></div>'; 275 275 } 276 276 277 277 ?> -
wp-admin/network/upgrade.php
36 36 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 37 37 38 38 if ( ! current_user_can( 'manage_network' ) ) 39 wp_die( __( ' You do not have permissionto access this page.' ), 403 );39 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 40 40 41 41 echo '<div class="wrap">'; 42 42 echo '<h1>' . __( 'Upgrade Network' ) . '</h1>'; -
wp-admin/network/user-new.php
13 13 if ( ! is_multisite() ) 14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 if ( ! current_user_can( 'create_users') )17 wp_die(__(' You do not have sufficient permissionsto add users to this network.'));16 if ( ! current_user_can( 'create_users' ) ) 17 wp_die(__('Sorry, you are not allowed to add users to this network.')); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 34 34 check_admin_referer( 'add-user', '_wpnonce_add-user' ); 35 35 36 36 if ( ! current_user_can( 'manage_network_users' ) ) 37 wp_die( __( ' You do not have permissionto access this page.' ), 403 );37 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 38 38 39 39 if ( ! is_array( $_POST['user'] ) ) 40 40 wp_die( __( 'Cannot create an empty user.' ) ); -
wp-admin/network/users.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_network_users' ) ) 17 wp_die( __( ' You do not have permissionto access this page.' ), 403 );17 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 18 18 19 19 if ( isset( $_GET['action'] ) ) { 20 20 /** This action is documented in wp-admin/network/edit.php */ … … 23 23 switch ( $_GET['action'] ) { 24 24 case 'deleteuser': 25 25 if ( ! current_user_can( 'manage_network_users' ) ) 26 wp_die( __( ' You do not have permissionto access this page.' ), 403 );26 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 27 27 28 28 check_admin_referer( 'deleteuser' ); 29 29 … … 44 44 45 45 case 'allusers': 46 46 if ( !current_user_can( 'manage_network_users' ) ) 47 wp_die( __( ' You do not have permissionto access this page.' ), 403 );47 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 48 48 49 49 if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { 50 50 check_admin_referer( 'bulk-users-network' ); … … 57 57 switch ( $doaction ) { 58 58 case 'delete': 59 59 if ( ! current_user_can( 'delete_users' ) ) 60 wp_die( __( ' You do not have permissionto access this page.' ), 403 );60 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 61 61 $title = __( 'Users' ); 62 62 $parent_file = 'users.php'; 63 63 require_once( ABSPATH . 'wp-admin/admin-header.php' ); … … 106 106 case 'dodelete': 107 107 check_admin_referer( 'ms-users-delete' ); 108 108 if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) 109 wp_die( __( ' You do not have permissionto access this page.' ), 403 );109 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 110 110 111 111 if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) { 112 112 foreach ( $_POST['blog'] as $id => $users ) { -
wp-admin/options-discussion.php
9 9 require_once( dirname( __FILE__ ) . '/admin.php' ); 10 10 11 11 if ( ! current_user_can( 'manage_options' ) ) 12 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );12 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 13 13 14 14 $title = __('Discussion Settings'); 15 15 $parent_file = 'options-general.php'; -
wp-admin/options-general.php
13 13 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); 14 14 15 15 if ( ! current_user_can( 'manage_options' ) ) 16 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );16 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 17 17 18 18 $title = __('General Settings'); 19 19 $parent_file = 'options-general.php'; -
wp-admin/options-media.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( ! current_user_can( 'manage_options' ) ) 13 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 14 14 15 15 $title = __('Media Settings'); 16 16 $parent_file = 'options-general.php'; -
wp-admin/options-permalink.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( ! current_user_can( 'manage_options' ) ) 13 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 14 14 15 15 $title = __('Permalink Settings'); 16 16 $parent_file = 'options-general.php'; -
wp-admin/options-reading.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( ! current_user_can( 'manage_options' ) ) 13 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 14 14 15 15 $title = __( 'Reading Settings' ); 16 16 $parent_file = 'options-general.php'; -
wp-admin/options-writing.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( ! current_user_can( 'manage_options' ) ) 13 wp_die( __( ' You do not have sufficient permissionsto manage options for this site.' ) );13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 14 14 15 15 $title = __('Writing Settings'); 16 16 $parent_file = 'options-general.php'; -
wp-admin/options.php
47 47 if ( ! current_user_can( $capability ) ) { 48 48 wp_die( 49 49 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 50 '<p>' . __( ' You are not allowed to manage these items.' ) . '</p>',50 '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>', 51 51 403 52 52 ); 53 53 } … … 76 76 if ( is_multisite() && ! is_super_admin() && 'update' != $action ) { 77 77 wp_die( 78 78 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 79 '<p>' . __( ' You are not allowed to delete these items.' ) . '</p>',79 '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>', 80 80 403 81 81 ); 82 82 } … … 160 160 161 161 if ( 'options' == $option_page ) { 162 162 if ( is_multisite() && ! is_super_admin() ) 163 wp_die( __( ' You do not have sufficient permissionsto modify unregistered settings for this site.' ) );163 wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) ); 164 164 $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) ); 165 165 } else { 166 166 $options = $whitelist_options[ $option_page ]; -
wp-admin/plugin-editor.php
14 14 exit(); 15 15 } 16 16 17 if ( !current_user_can( 'edit_plugins') )18 wp_die( __(' You do not have sufficient permissionsto edit plugins for this site.') );17 if ( !current_user_can( 'edit_plugins' ) ) 18 wp_die( __('Sorry, you are not allowed to edit plugins for this site.') ); 19 19 20 $title = __( "Edit Plugins");20 $title = __('Edit Plugins'); 21 21 $parent_file = 'plugins.php'; 22 22 23 23 wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) ); -
wp-admin/plugin-install.php
14 14 */ 15 15 require_once( dirname( __FILE__ ) . '/admin.php' ); 16 16 17 if ( ! current_user_can( 'install_plugins') )18 wp_die(__(' You do not have sufficient permissionsto install plugins on this site.'));17 if ( ! current_user_can( 'install_plugins' ) ) 18 wp_die(__('Sorry, you are not allowed to install plugins on this site.')); 19 19 20 20 if ( is_multisite() && ! is_network_admin() ) { 21 21 wp_redirect( network_admin_url( 'plugin-install.php' ) ); -
wp-admin/plugins.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( ! current_user_can( 'activate_plugins') )13 wp_die( __( ' You do not have sufficient permissionsto manage plugins for this site.' ) );12 if ( ! current_user_can( 'activate_plugins' ) ) 13 wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) ); 14 14 15 15 $wp_list_table = _get_list_table('WP_Plugins_List_Table'); 16 16 $pagenum = $wp_list_table->get_pagenum(); … … 29 29 30 30 switch ( $action ) { 31 31 case 'activate': 32 if ( ! current_user_can( 'activate_plugins') )33 wp_die(__(' You do not have sufficient permissionsto activate plugins for this site.'));32 if ( ! current_user_can( 'activate_plugins' ) ) 33 wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); 34 34 35 35 if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) { 36 36 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); … … 68 68 exit; 69 69 70 70 case 'activate-selected': 71 if ( ! current_user_can( 'activate_plugins') )72 wp_die(__(' You do not have sufficient permissionsto activate plugins for this site.'));71 if ( ! current_user_can( 'activate_plugins' ) ) 72 wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); 73 73 74 74 check_admin_referer('bulk-plugins'); 75 75 … … 146 146 exit; 147 147 148 148 case 'error_scrape': 149 if ( ! current_user_can( 'activate_plugins') )150 wp_die(__(' You do not have sufficient permissionsto activate plugins for this site.'));149 if ( ! current_user_can( 'activate_plugins' ) ) 150 wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); 151 151 152 152 check_admin_referer('plugin-activation-error_' . $plugin); 153 153 … … 167 167 exit; 168 168 169 169 case 'deactivate': 170 if ( ! current_user_can( 'activate_plugins') )171 wp_die(__(' You do not have sufficient permissionsto deactivate plugins for this site.'));170 if ( ! current_user_can( 'activate_plugins' ) ) 171 wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.')); 172 172 173 173 check_admin_referer('deactivate-plugin_' . $plugin); 174 174 … … 192 192 exit; 193 193 194 194 case 'deactivate-selected': 195 if ( ! current_user_can( 'activate_plugins') )196 wp_die(__(' You do not have sufficient permissionsto deactivate plugins for this site.'));195 if ( ! current_user_can( 'activate_plugins' ) ) 196 wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.')); 197 197 198 198 check_admin_referer('bulk-plugins'); 199 199 … … 227 227 exit; 228 228 229 229 case 'delete-selected': 230 if ( ! current_user_can( 'delete_plugins') ) {231 wp_die(__(' You do not have sufficient permissionsto delete plugins for this site.'));230 if ( ! current_user_can( 'delete_plugins' ) ) { 231 wp_die(__('Sorry, you are not allowed to delete plugins for this site.')); 232 232 } 233 233 234 234 check_admin_referer('bulk-plugins'); … … 423 423 <?php if ( isset($_GET['error']) ) : 424 424 425 425 if ( isset( $_GET['main'] ) ) 426 $errmsg = __( ' You cannotdelete a plugin while it is active on the main site.' );426 $errmsg = __( 'Sorry, you are not allowed to delete a plugin while it is active on the main site.' ); 427 427 elseif ( isset($_GET['charsout']) ) 428 428 $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']); 429 429 else … … 477 477 478 478 <div class="wrap"> 479 479 <h1><?php echo esc_html( $title ); 480 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins') ) { ?>480 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) { ?> 481 481 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a> 482 482 <?php 483 483 } -
wp-admin/post-new.php
57 57 if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) { 58 58 wp_die( 59 59 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 60 '<p>' . __( ' You are not allowed to create posts as this user.' ) . '</p>',60 '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>', 61 61 403 62 62 ); 63 63 } -
wp-admin/post.php
110 110 wp_die( __( 'Unknown post type.' ) ); 111 111 112 112 if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) { 113 wp_die( __( ' You are not allowed to edit posts in this post type.' ) );113 wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); 114 114 } 115 115 116 116 if ( ! current_user_can( 'edit_post', $post_id ) ) 117 wp_die( __( ' You are not allowed to edit this item.' ) );117 wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); 118 118 119 119 if ( 'trash' == $post->post_status ) 120 120 wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) ); … … 211 211 wp_die( __( 'Unknown post type.' ) ); 212 212 213 213 if ( ! current_user_can( 'delete_post', $post_id ) ) 214 wp_die( __( ' You are not allowed to move this item to the Trash.' ) );214 wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); 215 215 216 216 if ( $user_id = wp_check_post_lock( $post_id ) ) { 217 217 $user = get_userdata( $user_id ); 218 wp_die( sprintf( __( ' You cannotmove this item to the Trash. %s is currently editing.' ), $user->display_name ) );218 wp_die( sprintf( __( 'Sorry, you are not allowed to move this item to the Trash. %s is currently editing.' ), $user->display_name ) ); 219 219 } 220 220 221 221 if ( ! wp_trash_post( $post_id ) ) … … 234 234 wp_die( __( 'Unknown post type.' ) ); 235 235 236 236 if ( ! current_user_can( 'delete_post', $post_id ) ) 237 wp_die( __( ' You are not allowed to restore this item from the Trash.' ) );237 wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) ); 238 238 239 239 if ( ! wp_untrash_post( $post_id ) ) 240 240 wp_die( __( 'Error in restoring from Trash.' ) ); … … 252 252 wp_die( __( 'Unknown post type.' ) ); 253 253 254 254 if ( ! current_user_can( 'delete_post', $post_id ) ) 255 wp_die( __( ' You are not allowed to delete this item.' ) );255 wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); 256 256 257 257 if ( $post->post_type == 'attachment' ) { 258 258 $force = ( ! MEDIA_TRASH ); -
wp-admin/press-this.php
14 14 if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { 15 15 wp_die( 16 16 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 17 '<p>' . __( ' You are not allowed to create posts as this user.' ) . '</p>',17 '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>', 18 18 403 19 19 ); 20 20 } -
wp-admin/term.php
35 35 ) { 36 36 wp_die( 37 37 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 38 '<p>' . __( ' You are not allowed to manage this item.' ) . '</p>',38 '<p>' . __( 'Sorry, you are not allowed to manage this item.' ) . '</p>', 39 39 403 40 40 ); 41 41 } -
wp-admin/theme-editor.php
14 14 exit(); 15 15 } 16 16 17 if ( !current_user_can( 'edit_themes') )18 wp_die('<p>'.__(' You do not have sufficient permissionsto edit templates for this site.').'</p>');17 if ( !current_user_can( 'edit_themes' ) ) 18 wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>'); 19 19 20 $title = __( "Edit Themes");20 $title = __('Edit Themes'); 21 21 $parent_file = 'themes.php'; 22 22 23 23 get_current_screen()->add_help_tab( array( -
wp-admin/theme-install.php
13 13 wp_reset_vars( array( 'tab' ) ); 14 14 15 15 if ( ! current_user_can('install_themes') ) 16 wp_die( __( ' You do not have sufficient permissionsto install themes on this site.' ) );16 wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); 17 17 18 18 if ( is_multisite() && ! is_network_admin() ) { 19 19 wp_redirect( network_admin_url( 'theme-install.php' ) ); -
wp-admin/themes.php
12 12 if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) { 13 13 wp_die( 14 14 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 15 '<p>' . __( ' You are not allowed to edit theme options on this site.' ) . '</p>',15 '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>', 16 16 403 17 17 ); 18 18 } … … 40 40 if ( ! current_user_can( 'delete_themes' ) ) { 41 41 wp_die( 42 42 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 43 '<p>' . __( ' You are not allowed to delete this item.' ) . '</p>',43 '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>', 44 44 403 45 45 ); 46 46 } … … 169 169 elseif ( isset($_GET['deleted']) ) : ?> 170 170 <div id="message3" class="updated notice is-dismissible"><p><?php _e('Theme deleted.') ?></p></div> 171 171 <?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?> 172 <div id="message4" class="error"><p><?php _e( ' You cannotdelete a theme while it has an active child theme.' ); ?></p></div>172 <div id="message4" class="error"><p><?php _e( 'Sorry, you are not allowed to delete a theme while it has an active child theme.' ); ?></p></div> 173 173 <?php 174 174 endif; 175 175 … … 290 290 291 291 <?php 292 292 // List broken themes, if any. 293 if ( ! is_multisite() && current_user_can( 'edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {293 if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) { 294 294 ?> 295 295 296 296 <div class="broken-themes"> -
wp-admin/tools.php
35 35 <div class="wrap"> 36 36 <h1><?php echo esc_html( $title ); ?></h1> 37 37 38 <?php if ( current_user_can( 'edit_posts') ) : ?>38 <?php if ( current_user_can( 'edit_posts' ) ) : ?> 39 39 <div class="card pressthis"> 40 40 <h2><?php _e('Press This') ?></h2> 41 41 <p><?php _e( 'Press This is a little tool that lets you grab bits of the web and create new posts with ease.' );?></p> -
wp-admin/update-core.php
20 20 } 21 21 22 22 if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) ) 23 wp_die( __( ' You do not have sufficient permissionsto update this site.' ) );23 wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 24 24 25 25 /** 26 26 * … … 68 68 $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' ); 69 69 70 70 if ( !$mysql_compat && !$php_compat ) 71 $message = sprintf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );71 $message = sprintf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ); 72 72 elseif ( !$php_compat ) 73 $message = sprintf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );73 $message = sprintf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); 74 74 elseif ( !$mysql_compat ) 75 $message = sprintf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version );75 $message = sprintf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); 76 76 else 77 77 $message = sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string); 78 78 if ( !$mysql_compat || !$php_compat ) … … 623 623 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 624 624 625 625 if ( ! current_user_can( 'update_core' ) ) 626 wp_die( __( ' You do not have sufficient permissionsto update this site.' ) );626 wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 627 627 628 628 check_admin_referer('upgrade-core'); 629 629 … … 647 647 } elseif ( 'do-plugin-upgrade' == $action ) { 648 648 649 649 if ( ! current_user_can( 'update_plugins' ) ) 650 wp_die( __( ' You do not have sufficient permissionsto update this site.' ) );650 wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 651 651 652 652 check_admin_referer('upgrade-core'); 653 653 … … 675 675 } elseif ( 'do-theme-upgrade' == $action ) { 676 676 677 677 if ( ! current_user_can( 'update_themes' ) ) 678 wp_die( __( ' You do not have sufficient permissionsto update this site.' ) );678 wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 679 679 680 680 check_admin_referer('upgrade-core'); 681 681 … … 705 705 } elseif ( 'do-translation-upgrade' == $action ) { 706 706 707 707 if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) ) 708 wp_die( __( ' You do not have sufficient permissionsto update this site.' ) );708 wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 709 709 710 710 check_admin_referer( 'upgrade-translations' ); 711 711 -
wp-admin/update.php
21 21 22 22 if ( 'update-selected' == $action ) { 23 23 if ( ! current_user_can( 'update_plugins' ) ) 24 wp_die( __( ' You do not have sufficient permissionsto update plugins for this site.' ) );24 wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) ); 25 25 26 26 check_admin_referer( 'bulk-update-plugins' ); 27 27 … … 46 46 iframe_footer(); 47 47 48 48 } elseif ( 'upgrade-plugin' == $action ) { 49 if ( ! current_user_can( 'update_plugins') )50 wp_die(__(' You do not have sufficient permissionsto update plugins for this site.'));49 if ( ! current_user_can( 'update_plugins' ) ) 50 wp_die(__('Sorry, you are not allowed to update plugins for this site.')); 51 51 52 52 check_admin_referer('upgrade-plugin_' . $plugin); 53 53 … … 67 67 include(ABSPATH . 'wp-admin/admin-footer.php'); 68 68 69 69 } elseif ('activate-plugin' == $action ) { 70 if ( ! current_user_can( 'update_plugins') )71 wp_die(__(' You do not have sufficient permissionsto update plugins for this site.'));70 if ( ! current_user_can( 'update_plugins' ) ) 71 wp_die(__('Sorry, you are not allowed to update plugins for this site.')); 72 72 73 73 check_admin_referer('activate-plugin_' . $plugin); 74 74 if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { … … 92 92 iframe_footer(); 93 93 } elseif ( 'install-plugin' == $action ) { 94 94 95 if ( ! current_user_can( 'install_plugins') )96 wp_die( __( ' You do not have sufficient permissionsto install plugins on this site.' ) );95 if ( ! current_user_can( 'install_plugins' ) ) 96 wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); 97 97 98 98 include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api.. 99 99 … … 141 141 } elseif ( 'upload-plugin' == $action ) { 142 142 143 143 if ( ! current_user_can( 'upload_plugins' ) ) { 144 wp_die( __( ' You do not have sufficient permissionsto install plugins on this site.' ) );144 wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); 145 145 } 146 146 147 147 check_admin_referer('plugin-upload'); … … 168 168 169 169 } elseif ( 'upgrade-theme' == $action ) { 170 170 171 if ( ! current_user_can( 'update_themes') )172 wp_die(__(' You do not have sufficient permissionsto update themes for this site.'));171 if ( ! current_user_can( 'update_themes' ) ) 172 wp_die(__('Sorry, you are not allowed to update themes for this site.')); 173 173 174 174 check_admin_referer('upgrade-theme_' . $theme); 175 175 … … 190 190 include(ABSPATH . 'wp-admin/admin-footer.php'); 191 191 } elseif ( 'update-selected-themes' == $action ) { 192 192 if ( ! current_user_can( 'update_themes' ) ) 193 wp_die( __( ' You do not have sufficient permissionsto update themes for this site.' ) );193 wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) ); 194 194 195 195 check_admin_referer( 'bulk-update-themes' ); 196 196 … … 215 215 iframe_footer(); 216 216 } elseif ( 'install-theme' == $action ) { 217 217 218 if ( ! current_user_can( 'install_themes') )219 wp_die( __( ' You do not have sufficient permissionsto install themes on this site.' ) );218 if ( ! current_user_can( 'install_themes' ) ) 219 wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); 220 220 221 221 include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api.. 222 222 … … 246 246 } elseif ( 'upload-theme' == $action ) { 247 247 248 248 if ( ! current_user_can( 'upload_themes' ) ) { 249 wp_die( __( ' You do not have sufficient permissionsto install themes on this site.' ) );249 wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); 250 250 } 251 251 252 252 check_admin_referer('theme-upload'); -
wp-admin/upgrade.php
78 78 79 79 <?php elseif ( !$php_compat || !$mysql_compat ) : 80 80 if ( !$mysql_compat && !$php_compat ) 81 printf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );81 printf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); 82 82 elseif ( !$php_compat ) 83 printf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );83 printf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); 84 84 elseif ( !$mysql_compat ) 85 printf( __(' You cannotupdate because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );85 printf( __('Sorry, you are not allowed to update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); 86 86 ?> 87 87 <?php else : 88 88 switch ( $step ) : -
wp-admin/upload.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( !current_user_can( 'upload_files') )13 wp_die( __( ' You do not have permissionto upload files.' ) );12 if ( !current_user_can( 'upload_files' ) ) 13 wp_die( __( 'Sorry, you are not allowed to upload files.' ) ); 14 14 15 15 $mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid'; 16 16 $modes = array( 'grid', 'list' ); … … 132 132 break; 133 133 foreach ( (array) $post_ids as $post_id ) { 134 134 if ( !current_user_can( 'delete_post', $post_id ) ) 135 wp_die( __( ' You are not allowed to move this item to the Trash.' ) );135 wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); 136 136 137 137 if ( !wp_trash_post( $post_id ) ) 138 138 wp_die( __( 'Error in moving to Trash.' ) ); … … 144 144 break; 145 145 foreach ( (array) $post_ids as $post_id ) { 146 146 if ( !current_user_can( 'delete_post', $post_id ) ) 147 wp_die( __( ' You are not allowed to move this item out of the Trash.' ) );147 wp_die( __( 'Sorry, you are not allowed to move this item out of the Trash.' ) ); 148 148 149 149 if ( !wp_untrash_post( $post_id ) ) 150 150 wp_die( __( 'Error in restoring from Trash.' ) ); … … 156 156 break; 157 157 foreach ( (array) $post_ids as $post_id_del ) { 158 158 if ( !current_user_can( 'delete_post', $post_id_del ) ) 159 wp_die( __( ' You are not allowed to delete this item.' ) );159 wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); 160 160 161 161 if ( !wp_delete_attachment( $post_id_del ) ) 162 162 wp_die( __( 'Error in deleting.' ) ); -
wp-admin/user-edit.php
26 26 wp_enqueue_script('user-profile'); 27 27 28 28 $title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User'); 29 if ( current_user_can( 'edit_users') && !IS_PROFILE_PAGE )29 if ( current_user_can( 'edit_users' ) && !IS_PROFILE_PAGE ) 30 30 $submenu_file = 'users.php'; 31 31 else 32 32 $submenu_file = 'profile.php'; 33 33 34 if ( current_user_can( 'edit_users') && !is_user_admin() )34 if ( current_user_can( 'edit_users' ) && !is_user_admin() ) 35 35 $parent_file = 'users.php'; 36 36 else 37 37 $parent_file = 'profile.php'; … … 77 77 && $user_id != $current_user->ID 78 78 && ! apply_filters( 'enable_edit_any_user_configuration', true ) 79 79 ) { 80 wp_die( __( ' You do not have permissionto edit this user.' ) );80 wp_die( __( 'Sorry, you are not allowed to edit this user.' ) ); 81 81 } 82 82 83 83 // Execute confirmed email change. See send_confirmation_on_profile_email(). … … 110 110 check_admin_referer('update-user_' . $user_id); 111 111 112 112 if ( !current_user_can('edit_user', $user_id) ) 113 wp_die(__(' You do not have permissionto edit this user.'));113 wp_die(__('Sorry, you are not allowed to edit this user.')); 114 114 115 115 if ( IS_PROFILE_PAGE ) { 116 116 /** … … 163 163 $profileuser = get_user_to_edit($user_id); 164 164 165 165 if ( !current_user_can('edit_user', $user_id) ) 166 wp_die(__(' You do not have permissionto edit this user.'));166 wp_die(__('Sorry, you are not allowed to edit this user.')); 167 167 168 168 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); 169 169 -
wp-admin/user-new.php
13 13 if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) { 14 14 wp_die( 15 15 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 16 '<p>' . __( ' You do not have sufficient permissionsto add users to this network.' ) . '</p>',16 '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>', 17 17 403 18 18 ); 19 19 } … … 20 20 } elseif ( ! current_user_can( 'create_users' ) ) { 21 21 wp_die( 22 22 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 23 '<p>' . __( ' You are not allowed to create users.' ) . '</p>',23 '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>', 24 24 403 25 25 ); 26 26 } … … 53 53 if ( ! current_user_can( 'promote_user', $user_details->ID ) ) { 54 54 wp_die( 55 55 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 56 '<p>' . __( ' You do not have sufficient permissionsto add users to this network.' ) . '</p>',56 '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>', 57 57 403 58 58 ); 59 59 } … … 107 107 if ( ! current_user_can( 'create_users' ) ) { 108 108 wp_die( 109 109 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 110 '<p>' . __( ' You are not allowed to create users.' ) . '</p>',110 '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>', 111 111 403 112 112 ); 113 113 } … … 166 166 $parent_file = 'users.php'; 167 167 168 168 $do_both = false; 169 if ( is_multisite() && current_user_can( 'promote_users') && current_user_can('create_users') )169 if ( is_multisite() && current_user_can( 'promote_users' ) && current_user_can( 'create_users' ) ) 170 170 $do_both = true; 171 171 172 172 $help = '<p>' . __('To add a new user to your site, fill in the form on this screen and click the Add New User button at the bottom.') . '</p>'; … … 484 484 <?php submit_button( __( 'Add New User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?> 485 485 486 486 </form> 487 <?php } // current_user_can( 'create_users') ?>487 <?php } // current_user_can( 'create_users' ) ?> 488 488 </div> 489 489 <?php 490 490 include( ABSPATH . 'wp-admin/admin-footer.php' ); -
wp-admin/users.php
13 13 if ( ! current_user_can( 'list_users' ) ) { 14 14 wp_die( 15 15 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 16 '<p>' . __( ' You are not allowed to browse users.' ) . '</p>',16 '<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>', 17 17 403 18 18 ); 19 19 } -
wp-admin/widgets.php
15 15 if ( ! current_user_can( 'edit_theme_options' ) ) { 16 16 wp_die( 17 17 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 18 '<p>' . __( ' You are not allowed to edit theme options on this site.' ) . '</p>',18 '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>', 19 19 403 20 20 ); 21 21 } -
wp-includes/admin-bar.php
688 688 * @param WP_Admin_Bar $wp_admin_bar 689 689 */ 690 690 function wp_admin_bar_comments_menu( $wp_admin_bar ) { 691 if ( !current_user_can( 'edit_posts') )691 if ( !current_user_can( 'edit_posts' ) ) 692 692 return; 693 693 694 694 $awaiting_mod = wp_count_comments(); -
wp-includes/class-wp-customize-manager.php
387 387 show_admin_bar( false ); 388 388 389 389 if ( ! current_user_can( 'customize' ) ) { 390 $this->wp_die( -1, __( ' You are not allowed to customize this site.' ) );390 $this->wp_die( -1, __( 'Sorry, you are not allowed to customize this site.' ) ); 391 391 } 392 392 393 393 $this->original_stylesheet = get_stylesheet(); … … 401 401 // If the requested theme is not the active theme and the user doesn't have the 402 402 // switch_themes cap, bail. 403 403 if ( ! current_user_can( 'switch_themes' ) ) { 404 $this->wp_die( -1, __( ' You are not allowed to edit theme options on this site.' ) );404 $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) ); 405 405 } 406 406 407 407 // If the theme has errors while loading, bail. -
wp-includes/class-wp-xmlrpc-server.php
1259 1259 if ( 'private' === $post_data['post_status'] || ! empty( $post_data['post_password'] ) ) { 1260 1260 // Error if the client tried to stick the post, otherwise, silently unstick. 1261 1261 if ( ! empty( $post_data['sticky'] ) ) { 1262 return new IXR_Error( 401, __( 'Sorry, you cannotstick a private post.' ) );1262 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to stick a private post.' ) ); 1263 1263 } 1264 1264 1265 1265 if ( $update ) { … … 1267 1267 } 1268 1268 } elseif ( isset( $post_data['sticky'] ) ) { 1269 1269 if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) { 1270 return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );1270 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to stick this post.' ) ); 1271 1271 } 1272 1272 1273 1273 $sticky = wp_validate_boolean( $post_data['sticky'] ); … … 1307 1307 if ( ! get_post( $post_data['ID'] ) ) 1308 1308 return new IXR_Error( 401, __( 'Invalid post ID.' ) ); 1309 1309 if ( ! current_user_can( 'edit_post', $post_data['ID'] ) ) 1310 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );1310 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 1311 1311 if ( $post_data['post_type'] != get_post_type( $post_data['ID'] ) ) 1312 1312 return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); 1313 1313 } else { 1314 1314 if ( ! current_user_can( $post_type->cap->create_posts ) || ! current_user_can( $post_type->cap->edit_posts ) ) 1315 return new IXR_Error( 401, __( 'Sorry, you are not allowed to post on this site.' ) );1315 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to post on this site.' ) ); 1316 1316 } 1317 1317 1318 1318 switch ( $post_data['post_status'] ) { … … 1321 1321 break; 1322 1322 case 'private': 1323 1323 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1324 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ) );1324 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to create private posts in this post type' ) ); 1325 1325 break; 1326 1326 case 'publish': 1327 1327 case 'future': 1328 1328 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1329 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ) );1329 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to publish posts in this post type' ) ); 1330 1330 break; 1331 1331 default: 1332 1332 if ( ! get_post_status_object( $post_data['post_status'] ) ) … … 1335 1335 } 1336 1336 1337 1337 if ( ! empty( $post_data['post_password'] ) && ! current_user_can( $post_type->cap->publish_posts ) ) 1338 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type' ) );1338 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to create password protected posts in this post type' ) ); 1339 1339 1340 1340 $post_data['post_author'] = absint( $post_data['post_author'] ); 1341 1341 if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) { 1342 1342 if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) 1343 return new IXR_Error( 401, __( ' You are not allowed to create posts as this user.' ) );1343 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) ); 1344 1344 1345 1345 $author = get_userdata( $post_data['post_author'] ); 1346 1346 … … 1415 1415 return new IXR_Error( 401, __( 'Sorry, one of the given taxonomies is not supported by the post type.' ) ); 1416 1416 1417 1417 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->assign_terms ) ) 1418 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) );1418 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) ); 1419 1419 1420 1420 $term_ids = $post_data['terms'][$taxonomy]; 1421 1421 $terms[ $taxonomy ] = array(); … … 1439 1439 return new IXR_Error( 401, __( 'Sorry, one of the given taxonomies is not supported by the post type.' ) ); 1440 1440 1441 1441 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->assign_terms ) ) 1442 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) );1442 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) ); 1443 1443 1444 1444 /* 1445 1445 * For hierarchical taxonomies, we can't assign a term when multiple terms … … 1468 1468 if ( ! $term ) { 1469 1469 // Term doesn't exist, so check that the user is allowed to create new terms. 1470 1470 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->edit_terms ) ) 1471 return new IXR_Error( 401, __( 'Sorry, you are not allowed to add a term to one of the given taxonomies.' ) );1471 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to add a term to one of the given taxonomies.' ) ); 1472 1472 1473 1473 // Create the new term. 1474 1474 $term_info = wp_insert_term( $term_name, $taxonomy ); … … 1634 1634 } 1635 1635 1636 1636 if ( ! current_user_can( 'delete_post', $post_id ) ) { 1637 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto delete this post.' ) );1637 return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) ); 1638 1638 } 1639 1639 1640 1640 $result = wp_delete_post( $post_id ); … … 1731 1731 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 1732 1732 1733 1733 if ( ! current_user_can( 'edit_post', $post_id ) ) 1734 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );1734 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 1735 1735 1736 1736 return $this->_prepare_post( $post, $fields ); 1737 1737 } … … 1792 1792 } 1793 1793 1794 1794 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 1795 return new IXR_Error( 401, __( ' You are not allowed to edit posts in this post type.' ));1795 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' )); 1796 1796 1797 1797 $query['post_type'] = $post_type->name; 1798 1798 … … 1875 1875 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); 1876 1876 1877 1877 if ( ! current_user_can( $taxonomy->cap->manage_terms ) ) 1878 return new IXR_Error( 401, __( ' You are not allowed to create terms in this taxonomy.' ) );1878 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) ); 1879 1879 1880 1880 $taxonomy = (array) $taxonomy; 1881 1881 … … 1962 1962 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); 1963 1963 1964 1964 if ( ! current_user_can( $taxonomy->cap->edit_terms ) ) 1965 return new IXR_Error( 401, __( ' You are not allowed to edit terms in this taxonomy.' ) );1965 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) ); 1966 1966 1967 1967 $taxonomy = (array) $taxonomy; 1968 1968 … … 2058 2058 $taxonomy = get_taxonomy( $taxonomy ); 2059 2059 2060 2060 if ( ! current_user_can( $taxonomy->cap->delete_terms ) ) 2061 return new IXR_Error( 401, __( ' You are not allowed to delete terms in this taxonomy.' ) );2061 return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete terms in this taxonomy.' ) ); 2062 2062 2063 2063 $term = get_term( $term_id, $taxonomy->name ); 2064 2064 … … 2129 2129 $taxonomy = get_taxonomy( $taxonomy ); 2130 2130 2131 2131 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2132 return new IXR_Error( 401, __( ' You are not allowed to assign terms in this taxonomy.' ) );2132 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) ); 2133 2133 2134 2134 $term = get_term( $term_id , $taxonomy->name, ARRAY_A ); 2135 2135 … … 2187 2187 $taxonomy = get_taxonomy( $taxonomy ); 2188 2188 2189 2189 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2190 return new IXR_Error( 401, __( ' You are not allowed to assign terms in this taxonomy.' ) );2190 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) ); 2191 2191 2192 2192 $query = array(); 2193 2193 … … 2282 2282 $taxonomy = get_taxonomy( $taxonomy ); 2283 2283 2284 2284 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2285 return new IXR_Error( 401, __( ' You are not allowed to assign terms in this taxonomy.' ) );2285 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) ); 2286 2286 2287 2287 return $this->_prepare_taxonomy( $taxonomy, $fields ); 2288 2288 } … … 2412 2412 do_action( 'xmlrpc_call', 'wp.getUser' ); 2413 2413 2414 2414 if ( ! current_user_can( 'edit_user', $user_id ) ) 2415 return new IXR_Error( 401, __( 'Sorry, you cannotedit users.' ) );2415 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit users.' ) ); 2416 2416 2417 2417 $user_data = get_userdata( $user_id ); 2418 2418 … … 2470 2470 do_action( 'xmlrpc_call', 'wp.getUsers' ); 2471 2471 2472 2472 if ( ! current_user_can( 'list_users' ) ) 2473 return new IXR_Error( 401, __( ' You are not allowed to browse users.' ) );2473 return new IXR_Error( 401, __( 'Sorry, you are not allowed to browse users.' ) ); 2474 2474 2475 2475 $query = array( 'fields' => 'all_with_meta' ); 2476 2476 … … 2543 2543 do_action( 'xmlrpc_call', 'wp.getProfile' ); 2544 2544 2545 2545 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2546 return new IXR_Error( 401, __( 'Sorry, you cannotedit your profile.' ) );2546 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit your profile.' ) ); 2547 2547 2548 2548 $user_data = get_userdata( $user->ID ); 2549 2549 … … 2589 2589 do_action( 'xmlrpc_call', 'wp.editProfile' ); 2590 2590 2591 2591 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2592 return new IXR_Error( 401, __( 'Sorry, you cannotedit your profile.' ) );2592 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit your profile.' ) ); 2593 2593 2594 2594 // holds data of the user 2595 2595 $user_data = array(); … … 2659 2659 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 2660 2660 2661 2661 if ( !current_user_can( 'edit_page', $page_id ) ) 2662 return new IXR_Error( 401, __( 'Sorry, you cannotedit this page.' ) );2662 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this page.' ) ); 2663 2663 2664 2664 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2665 2665 do_action( 'xmlrpc_call', 'wp.getPage' ); … … 2700 2700 return $this->error; 2701 2701 2702 2702 if ( !current_user_can( 'edit_pages' ) ) 2703 return new IXR_Error( 401, __( 'Sorry, you cannotedit pages.' ) );2703 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit pages.' ) ); 2704 2704 2705 2705 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2706 2706 do_action( 'xmlrpc_call', 'wp.getPages' ); … … 2794 2794 2795 2795 // Make sure the user can delete pages. 2796 2796 if ( !current_user_can('delete_page', $page_id) ) 2797 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto delete this page.' ) );2797 return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this page.' ) ); 2798 2798 2799 2799 // Attempt to delete the page. 2800 2800 $result = wp_delete_post($page_id); … … 2856 2856 2857 2857 // Make sure the user is allowed to edit pages. 2858 2858 if ( !current_user_can('edit_page', $page_id) ) 2859 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto edit this page.' ) );2859 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) ); 2860 2860 2861 2861 // Mark this as content for a page. 2862 2862 $content['post_type'] = 'page'; … … 2902 2902 return $this->error; 2903 2903 2904 2904 if ( !current_user_can( 'edit_pages' ) ) 2905 return new IXR_Error( 401, __( 'Sorry, you cannotedit pages.' ) );2905 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit pages.' ) ); 2906 2906 2907 2907 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2908 2908 do_action( 'xmlrpc_call', 'wp.getPageList' ); … … 2957 2957 if ( !$user = $this->login($username, $password) ) 2958 2958 return $this->error; 2959 2959 2960 if ( !current_user_can( 'edit_posts') )2961 return new IXR_Error( 401, __( 'Sorry, you cannotedit posts on this site.' ) );2960 if ( !current_user_can( 'edit_posts' ) ) 2961 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts on this site.' ) ); 2962 2962 2963 2963 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2964 2964 do_action( 'xmlrpc_call', 'wp.getAuthors' ); … … 3052 3052 do_action( 'xmlrpc_call', 'wp.newCategory' ); 3053 3053 3054 3054 // Make sure the user is allowed to add a category. 3055 if ( !current_user_can( 'manage_categories') )3056 return new IXR_Error(401, __('Sorry, you do not have the rightto add a category.'));3055 if ( !current_user_can( 'manage_categories' ) ) 3056 return new IXR_Error(401, __('Sorry, you are not allowed to add a category.')); 3057 3057 3058 3058 // If no slug was provided make it empty so that 3059 3059 // WordPress will generate one. … … 3127 3127 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3128 3128 do_action( 'xmlrpc_call', 'wp.deleteCategory' ); 3129 3129 3130 if ( !current_user_can( 'manage_categories') )3131 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto delete a category.' ) );3130 if ( !current_user_can( 'manage_categories' ) ) 3131 return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete a category.' ) ); 3132 3132 3133 3133 $status = wp_delete_term( $category_id, 'category' ); 3134 3134 … … 3226 3226 } 3227 3227 3228 3228 if ( ! current_user_can( 'edit_comment', $comment_id ) ) { 3229 return new IXR_Error( 403, __( ' You are not allowed to moderate or edit this comment.' ) );3229 return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) ); 3230 3230 } 3231 3231 3232 3232 return $this->_prepare_comment( $comment ); … … 3358 3358 } 3359 3359 3360 3360 if ( !current_user_can( 'edit_comment', $comment_ID ) ) { 3361 return new IXR_Error( 403, __( ' You are not allowed to moderate or edit this comment.' ) );3361 return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) ); 3362 3362 } 3363 3363 3364 3364 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 3425 3425 } 3426 3426 3427 3427 if ( ! current_user_can( 'edit_comment', $comment_ID ) ) { 3428 return new IXR_Error( 403, __( ' You are not allowed to moderate or edit this comment.' ) );3428 return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) ); 3429 3429 } 3430 3430 3431 3431 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 3868 3868 return $this->error; 3869 3869 3870 3870 if ( !current_user_can( 'manage_options' ) ) 3871 return new IXR_Error( 403, __( ' You are not allowed to update options.' ) );3871 return new IXR_Error( 403, __( 'Sorry, you are not allowed to update options.' ) ); 3872 3872 3873 3873 $option_names = array(); 3874 3874 foreach ( $options as $o_name => $o_value ) { … … 3920 3920 return $this->error; 3921 3921 3922 3922 if ( !current_user_can( 'upload_files' ) ) 3923 return new IXR_Error( 403, __( ' You do not have permissionto upload files.' ) );3923 return new IXR_Error( 403, __( 'Sorry, you are not allowed to upload files.' ) ); 3924 3924 3925 3925 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3926 3926 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); … … 3968 3968 return $this->error; 3969 3969 3970 3970 if ( !current_user_can( 'upload_files' ) ) 3971 return new IXR_Error( 401, __( ' You do not have permissionto upload files.' ) );3971 return new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) ); 3972 3972 3973 3973 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3974 3974 do_action( 'xmlrpc_call', 'wp.getMediaLibrary' ); … … 4100 4100 $post_type = get_post_type_object( $post_type_name ); 4101 4101 4102 4102 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 4103 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type.' ) );4103 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post type.' ) ); 4104 4104 4105 4105 return $this->_prepare_post_type( $post_type, $fields ); 4106 4106 } … … 4216 4216 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4217 4217 4218 4218 if ( ! current_user_can( 'edit_post', $post_id ) ) 4219 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );4219 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts.' ) ); 4220 4220 4221 4221 // Check if revisions are enabled. 4222 4222 if ( ! wp_revisions_enabled( $post ) ) … … 4286 4286 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4287 4287 4288 4288 if ( ! current_user_can( 'edit_post', $revision->post_parent ) ) 4289 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );4289 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 4290 4290 4291 4291 // Check if revisions are disabled. 4292 4292 if ( ! wp_revisions_enabled( $post ) ) … … 4332 4332 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4333 4333 do_action( 'xmlrpc_call', 'blogger.getUsersBlogs' ); 4334 4334 4335 $is_admin = current_user_can( 'manage_options');4335 $is_admin = current_user_can( 'manage_options' ); 4336 4336 4337 4337 $struct = array( 4338 4338 'isAdmin' => $is_admin, … … 4455 4455 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4456 4456 4457 4457 if ( !current_user_can( 'edit_post', $post_ID ) ) 4458 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );4458 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 4459 4459 4460 4460 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4461 4461 do_action( 'xmlrpc_call', 'blogger.getPost' ); … … 4508 4508 return $this->error; 4509 4509 4510 4510 if ( ! current_user_can( 'edit_posts' ) ) 4511 return new IXR_Error( 401, __( 'Sorry, you cannotedit posts on this site.' ) );4511 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts on this site.' ) ); 4512 4512 4513 4513 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4514 4514 do_action( 'xmlrpc_call', 'blogger.getRecentPosts' ); … … 4602 4602 4603 4603 $cap = ($publish) ? 'publish_posts' : 'edit_posts'; 4604 4604 if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) || !current_user_can($cap) ) 4605 return new IXR_Error(401, __('Sorry, you are not allowed to post on this site.'));4605 return new IXR_Error(401, __('Sorry, Sorry, you are not allowed to post on this site.')); 4606 4606 4607 4607 $post_status = ($publish) ? 'publish' : 'draft'; 4608 4608 … … 4682 4682 $this->escape($actual_post); 4683 4683 4684 4684 if ( ! current_user_can( 'edit_post', $post_ID ) ) { 4685 return new IXR_Error(401, __('Sorry, you do not have the rightto edit this post.'));4685 return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.')); 4686 4686 } 4687 4687 if ( 'publish' == $actual_post['post_status'] && ! current_user_can( 'publish_posts' ) ) { 4688 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto publish this post.' ) );4688 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) ); 4689 4689 } 4690 4690 4691 4691 $postdata = array(); … … 4752 4752 } 4753 4753 4754 4754 if ( ! current_user_can( 'delete_post', $post_ID ) ) { 4755 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto delete this post.' ) );4755 return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) ); 4756 4756 } 4757 4757 4758 4758 $result = wp_delete_post( $post_ID ); … … 4839 4839 $cap = 'publish_pages'; 4840 4840 else 4841 4841 $cap = 'edit_pages'; 4842 $error_message = __( 'Sorry, you are not allowed to publish pages on this site.' );4842 $error_message = __( 'Sorry, Sorry, you are not allowed to publish pages on this site.' ); 4843 4843 $post_type = 'page'; 4844 4844 if ( !empty( $content_struct['wp_page_template'] ) ) 4845 4845 $page_template = $content_struct['wp_page_template']; … … 4850 4850 $cap = 'publish_posts'; 4851 4851 else 4852 4852 $cap = 'edit_posts'; 4853 $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );4853 $error_message = __( 'Sorry, Sorry, you are not allowed to publish posts on this site.' ); 4854 4854 $post_type = 'post'; 4855 4855 } else { 4856 4856 // No other post_type values are allowed here … … 4863 4863 $cap = 'publish_posts'; 4864 4864 else 4865 4865 $cap = 'edit_posts'; 4866 $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );4866 $error_message = __( 'Sorry, Sorry, you are not allowed to publish posts on this site.' ); 4867 4867 $post_type = 'post'; 4868 4868 } 4869 4869 4870 4870 if ( ! current_user_can( get_post_type_object( $post_type )->cap->create_posts ) ) 4871 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts on this site.' ) );4871 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to publish posts on this site.' ) ); 4872 4872 if ( !current_user_can( $cap ) ) 4873 4873 return new IXR_Error( 401, $error_message ); 4874 4874 … … 4905 4905 switch ( $post_type ) { 4906 4906 case "post": 4907 4907 if ( !current_user_can( 'edit_others_posts' ) ) 4908 return new IXR_Error( 401, __( ' You are not allowed to create posts as this user.' ) );4908 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) ); 4909 4909 break; 4910 4910 case "page": 4911 4911 if ( !current_user_can( 'edit_others_pages' ) ) 4912 return new IXR_Error( 401, __( ' You are not allowed to create pages as this user.' ) );4912 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create pages as this user.' ) ); 4913 4913 break; 4914 4914 default: 4915 4915 return new IXR_Error( 401, __( 'Invalid post type' ) ); … … 5186 5186 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5187 5187 5188 5188 if ( ! current_user_can( 'edit_post', $post_ID ) ) 5189 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto edit this post.' ) );5189 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 5190 5190 5191 5191 // Use wp.editPost to edit post types other than post and page. 5192 5192 if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) … … 5245 5245 switch ( $post_type ) { 5246 5246 case 'post': 5247 5247 if ( ! current_user_can( 'edit_others_posts' ) ) { 5248 return new IXR_Error( 401, __( ' You are not allowed to change the post author as this user.' ) );5248 return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the post author as this user.' ) ); 5249 5249 } 5250 5250 break; 5251 5251 case 'page': 5252 5252 if ( ! current_user_can( 'edit_others_pages' ) ) { 5253 return new IXR_Error( 401, __( ' You are not allowed to change the page author as this user.' ) );5253 return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the page author as this user.' ) ); 5254 5254 } 5255 5255 break; 5256 5256 default: … … 5357 5357 5358 5358 if ( 'publish' == $post_status || 'private' == $post_status ) { 5359 5359 if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) { 5360 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto publish this page.' ) );5360 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this page.' ) ); 5361 5361 } elseif ( ! current_user_can( 'publish_posts' ) ) { 5362 return new IXR_Error( 401, __( 'Sorry, you do not have the rightto publish this post.' ) );5362 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) ); 5363 5363 } 5364 5364 } 5365 5365 … … 5483 5483 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5484 5484 5485 5485 if ( !current_user_can( 'edit_post', $post_ID ) ) 5486 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );5486 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 5487 5487 5488 5488 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5489 5489 do_action( 'xmlrpc_call', 'metaWeblog.getPost' ); … … 5613 5613 return $this->error; 5614 5614 5615 5615 if ( ! current_user_can( 'edit_posts' ) ) 5616 return new IXR_Error( 401, __( 'Sorry, you cannotedit posts on this site.' ) );5616 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts on this site.' ) ); 5617 5617 5618 5618 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5619 5619 do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts' ); … … 5789 5789 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5790 5790 do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' ); 5791 5791 5792 if ( !current_user_can( 'upload_files') ) {5793 $this->error = new IXR_Error( 401, __( ' You do not have permissionto upload files.' ) );5792 if ( !current_user_can( 'upload_files' ) ) { 5793 $this->error = new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) ); 5794 5794 return $this->error; 5795 5795 } 5796 5796 … … 5824 5824 $post_id = (int) $data['post_id']; 5825 5825 5826 5826 if ( ! current_user_can( 'edit_post', $post_id ) ) 5827 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );5827 return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) ); 5828 5828 } 5829 5829 $attachment = array( 5830 5830 'post_title' => $name, … … 5995 5995 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5996 5996 5997 5997 if ( !current_user_can( 'edit_post', $post_ID ) ) 5998 return new IXR_Error( 401, __( 'Sorry, you can notedit this post.' ) );5998 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 5999 5999 6000 6000 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6001 6001 do_action( 'xmlrpc_call', 'mt.getPostCategories' ); … … 6049 6049 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 6050 6050 6051 6051 if ( !current_user_can('edit_post', $post_ID) ) 6052 return new IXR_Error(401, __('Sorry, you cannotedit this post.'));6052 return new IXR_Error(401, __('Sorry, Sorry, you are not allowed to edit this post.')); 6053 6053 6054 6054 $catids = array(); 6055 6055 foreach ( $categories as $cat ) { … … 6168 6168 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 6169 6169 6170 6170 if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) ) 6171 return new IXR_Error(401, __('Sorry, you cannotpublish this post.'));6171 return new IXR_Error(401, __('Sorry, Sorry, you are not allowed to publish this post.')); 6172 6172 6173 6173 $postdata['post_status'] = 'publish'; 6174 6174 -
wp-includes/deprecated.php
1629 1629 * encode special characters and automatically display all of the content. The 1630 1630 * value of '2' will strip all HTML tags from the content. 1631 1631 * 1632 * Also note that you cannotset the amount of words and not set the html1632 * Also note that Sorry, you are not allowed to set the amount of words and not set the html 1633 1633 * encoding. If that is the case, then the html encoding will default to 2, 1634 1634 * which will strip all HTML tags. 1635 1635 * -
wp-includes/link-template.php
1451 1451 function get_edit_bookmark_link( $link = 0 ) { 1452 1452 $link = get_bookmark( $link ); 1453 1453 1454 if ( !current_user_can( 'manage_links') )1454 if ( !current_user_can( 'manage_links' ) ) 1455 1455 return; 1456 1456 1457 1457 $location = admin_url('link.php?action=edit&link_id=') . $link->link_id; … … 1480 1480 function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) { 1481 1481 $bookmark = get_bookmark($bookmark); 1482 1482 1483 if ( !current_user_can( 'manage_links') )1483 if ( !current_user_can( 'manage_links' ) ) 1484 1484 return; 1485 1485 1486 1486 if ( empty($link) ) -
wp-includes/ms-functions.php
438 438 } 439 439 440 440 if ( is_email_address_unsafe( $user_email ) ) 441 $errors->add('user_email', __(' You cannotuse that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.'));441 $errors->add('user_email', __('Sorry, you are not allowed to use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.')); 442 442 443 443 if ( strlen( $user_name ) < 4 ) 444 444 $errors->add('user_name', __( 'Username must be at least 4 characters.' ) ); -
wp-includes/rest-api/class-wp-rest-server.php
879 879 if ( is_wp_error( $permission ) ) { 880 880 $response = $permission; 881 881 } else if ( false === $permission || null === $permission ) { 882 $response = new WP_Error( 'rest_forbidden', __( " You don't have permissionto do this." ), array( 'status' => 403 ) );882 $response = new WP_Error( 'rest_forbidden', __( "Sorry, you are not allowed to do this." ), array( 'status' => 403 ) ); 883 883 } 884 884 } 885 885 } -
wp-includes/revision.php
553 553 $id = (int) $_GET['preview_id']; 554 554 555 555 if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) 556 wp_die( __(' You do not have permissionto preview drafts.') );556 wp_die( __('Sorry, you are not allowed to preview drafts.') ); 557 557 558 558 add_filter('the_preview', '_set_preview'); 559 559 } -
wp-includes/script-loader.php
124 124 125 125 $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 ); 126 126 did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array( 127 'noPerm' => __(' You do not have permissionto do that.'),127 'noPerm' => __('Sorry, you are not allowed to do that.'), 128 128 'broken' => __('An unidentified error has occurred.') 129 129 ) ); 130 130 … … 444 444 'cancel' => __( 'Cancel' ), 445 445 'close' => __( 'Close' ), 446 446 'cheatin' => __( 'Cheatin’ uh?' ), 447 'notAllowed' => __( ' You are not allowed to customize this site.' ),447 'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ), 448 448 'previewIframeTitle' => __( 'Site Preview' ), 449 449 'loginIframeTitle' => __( 'Session expired' ), 450 450 'collapseSidebar' => __( 'Collapse Sidebar' ), … … 484 484 if ( is_admin() ) { 485 485 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); 486 486 did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array( 487 'noPerm' => __(' You do not have permissionto do that.'),487 'noPerm' => __('Sorry, you are not allowed to do that.'), 488 488 'broken' => __('An unidentified error has occurred.') 489 489 )); 490 490 -
wp-includes/update.php
557 557 558 558 if ( ( $core = current_user_can( 'update_core' ) ) && function_exists( 'get_core_updates' ) ) { 559 559 $update_wordpress = get_core_updates( array('dismissed' => false) ); 560 if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array('development', 'latest') ) && current_user_can( 'update_core') )560 if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array('development', 'latest') ) && current_user_can( 'update_core' ) ) 561 561 $counts['wordpress'] = 1; 562 562 } 563 563 -
wp-includes/widgets.php
1232 1232 } 1233 1233 1234 1234 if ( is_wp_error($rss) ) { 1235 if ( is_admin() || current_user_can( 'manage_options') )1235 if ( is_admin() || current_user_can( 'manage_options' ) ) 1236 1236 echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>'; 1237 1237 return; 1238 1238 }