Ticket #34521: 34521.2.patch
File 34521.2.patch, 69.2 KB (added by , 8 years ago) |
---|
-
wp-admin/custom-header.php
932 932 */ 933 933 public function admin_page() { 934 934 if ( ! current_user_can('edit_theme_options') ) 935 wp_die( __('You do not have permission to customize headers.'));935 wp_die( __( 'You aren’t allowed to customize headers.' ) ); 936 936 $step = $this->step(); 937 937 if ( 2 == $step ) 938 938 $this->step_2(); -
wp-admin/export.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( !current_user_can('export') ) 13 wp_die( __('You do not have sufficient permissions to export the content of this site.'));13 wp_die( __( 'You aren’t 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
12 12 require_once( dirname( __FILE__ ) . '/admin.php' ); 13 13 14 14 if ( !current_user_can('import') ) 15 wp_die( __('You do not have sufficient permissions to import content in this site.'));15 wp_die( __( 'You aren’t allowed to import content in this site.' ) ); 16 16 17 17 $title = __('Import'); 18 18 -
wp-admin/includes/ajax-actions.php
1595 1595 1596 1596 if ( 'page' == $_POST['post_type'] ) { 1597 1597 if ( ! current_user_can( 'edit_page', $post_ID ) ) 1598 wp_die( __( 'You are not allowed to edit this page.' ) );1598 wp_die( __( 'You aren’t allowed to edit this page.' ) ); 1599 1599 } else { 1600 1600 if ( ! current_user_can( 'edit_post', $post_ID ) ) 1601 wp_die( __( 'You are not allowed to edit this post.' ) );1601 wp_die( __( 'You aren’t allowed to edit this post.' ) ); 1602 1602 } 1603 1603 1604 1604 if ( $last = wp_check_post_lock( $post_ID ) ) { … … 1989 1989 echo wp_json_encode( array( 1990 1990 'success' => false, 1991 1991 'data' => array( 1992 'message' => __( 'You do not have permissionto upload files.' ),1992 'message' => __( 'You aren’t allowed to upload files.' ), 1993 1993 'filename' => $_FILES['async-upload']['name'], 1994 1994 ) 1995 1995 ) ); … … 2003 2003 echo wp_json_encode( array( 2004 2004 'success' => false, 2005 2005 'data' => array( 2006 'message' => __( "You don't have permission to attach files to this post."),2006 'message' => __( 'You aren’t allowed to attach files to this post.' ), 2007 2007 'filename' => $_FILES['async-upload']['name'], 2008 2008 ) 2009 2009 ) ); … … 3072 3072 } 3073 3073 3074 3074 if ( ! current_user_can( 'update_plugins' ) ) { 3075 $status['error'] = __( 'You do not have sufficient permissionsto update plugins for this site.' );3075 $status['error'] = __( 'You aren’t allowed to update plugins for this site.' ); 3076 3076 wp_send_json_error( $status ); 3077 3077 } 3078 3078 -
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>' . __( 'You aren’t 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( __( 'You aren’t allowed to edit the links for this site.' ) ); 316 316 } -
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( __( 'You aren’t allowed to access this page.' ), 403 ); 343 343 } 344 344 345 345 $menu = add_menu_classes($menu); -
wp-admin/link-add.php
10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 12 if ( ! current_user_can('manage_links') ) 13 wp_die( __('You do not have sufficient permissions to add links to this site.'));13 wp_die( __( 'You aren’t 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
8 8 9 9 /** Load WordPress Administration Bootstrap */ 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( ! current_user_can( 'manage_links' ) ) 12 wp_die( __( 'You do not have sufficient permissionsto edit the links for this site.' ) );13 wp_die( __( 'You aren’t allowed to edit the links for this site.' ) ); 13 14 14 15 $wp_list_table = _get_list_table('WP_Links_List_Table'); 15 16 -
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 permissions to delete this site.'));16 wp_die( __( 'You aren’t 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
13 13 wp_die( __( 'Multisite support is not enabled.' ) ); 14 14 15 15 if ( ! current_user_can('read') ) 16 wp_die( __( 'You do not have sufficient permissionsto access this page.' ) );16 wp_die( __( 'You aren’t allowed to access this page.' ) ); 17 17 18 18 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; 19 19 -
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( __( 'You aren’t 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( __( 'You aren’t 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 permissions to edit this site.' ));18 wp_die( __( 'You aren’t allowed to edit this site.' ), 403 ); 19 19 } 20 20 21 21 get_current_screen()->add_help_tab( array( … … 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( __( 'You aren’t 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 permissions to add sites to this network.' ));20 wp_die( __( 'You aren’t allowed to add sites to this network.' ), 403 ); 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 permissions to edit this site.' ));17 wp_die( __( 'You aren’t allowed to edit this site.' ), 403 ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 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( __( 'You aren’t 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 permissions to manage themes for this site.' ));17 wp_die( __( 'You aren’t allowed to manage themes for this site.' ), 403 ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 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( __( 'You aren’t 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
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 permissions to edit this site.'));17 wp_die( __( 'You aren’t allowed to edit this site.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table('WP_Users_List_Table'); 20 20 $wp_list_table->prepare_items(); … … 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t allowed to change the current site.' ), 403 ); 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( __( 'You aren’t 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( __( 'You aren’t allowed to delete the site.' ), 403 ); 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( __( 'You aren’t allowed to change the current site.' ), 403 ); 161 161 } 162 162 } 163 163 } else { … … 233 233 $msg = __( 'Site deleted.' ); 234 234 break; 235 235 case 'not_deleted': 236 $msg = __( 'You do not have permissionto delete that site.' );236 $msg = __( 'You aren’t allowed to delete that site.' ); 237 237 break; 238 238 case 'archiveblog': 239 239 $msg = __( 'Site archived.' ); -
wp-admin/network/themes.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( !current_user_can('manage_network_themes') ) 17 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ));17 wp_die( __( 'You aren’t allowed to manage network themes.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); 20 20 $pagenum = $wp_list_table->get_pagenum(); … … 97 97 exit; 98 98 case 'delete-selected': 99 99 if ( ! current_user_can( 'delete_themes' ) ) { 100 wp_die( __( 'You do not have sufficient permissions to delete themes for this site.'));100 wp_die( __( 'You aren’t allowed to delete themes for this site.' ), 403 ); 101 101 } 102 102 103 103 check_admin_referer( 'bulk-themes' ); -
wp-admin/network/user-new.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can('create_users') ) 17 wp_die( __('You do not have sufficient permissions to add users to this network.'));17 wp_die( __( 'You aren’t allowed to add users to this network.' ), 403 ); 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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( __( 'You aren’t 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>' . __( 'You aren’t 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>' . __( 'You aren’t allowed to delete these items.' ) . '</p>', 80 80 403 81 81 ); 82 82 } … … 169 169 170 170 if ( 'options' == $option_page ) { 171 171 if ( is_multisite() && ! is_super_admin() ) 172 wp_die( __( 'You do not have sufficient permissionsto modify unregistered settings for this site.' ) );172 wp_die( __( 'You aren’t allowed to modify unregistered settings for this site.' ) ); 173 173 $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) ); 174 174 } else { 175 175 $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 permissions to edit plugins for this site.') );17 if ( !current_user_can( 'edit_plugins' ) ) 18 wp_die( __( 'You aren’t 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 permissions to install plugins on this site.'));17 if ( ! current_user_can( 'install_plugins' ) ) 18 wp_die( __( 'You aren’t 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( __( 'You aren’t 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(); … … 30 30 switch ( $action ) { 31 31 case 'activate': 32 32 if ( ! current_user_can('activate_plugins') ) 33 wp_die( __('You do not have sufficient permissions to activate plugins for this site.'));33 wp_die( __( 'You aren’t 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") ); … … 69 69 70 70 case 'activate-selected': 71 71 if ( ! current_user_can('activate_plugins') ) 72 wp_die( __('You do not have sufficient permissions to activate plugins for this site.'));72 wp_die( __( 'You aren’t allowed to activate plugins for this site.' ) ); 73 73 74 74 check_admin_referer('bulk-plugins'); 75 75 … … 147 147 148 148 case 'error_scrape': 149 149 if ( ! current_user_can('activate_plugins') ) 150 wp_die( __('You do not have sufficient permissions to activate plugins for this site.'));150 wp_die( __( 'You aren’t allowed to activate plugins for this site.' ) ); 151 151 152 152 check_admin_referer('plugin-activation-error_' . $plugin); 153 153 … … 168 168 169 169 case 'deactivate': 170 170 if ( ! current_user_can('activate_plugins') ) 171 wp_die( __('You do not have sufficient permissions to deactivate plugins for this site.'));171 wp_die( __( 'You aren’t allowed to deactivate plugins for this site.' ) ); 172 172 173 173 check_admin_referer('deactivate-plugin_' . $plugin); 174 174 … … 193 193 194 194 case 'deactivate-selected': 195 195 if ( ! current_user_can('activate_plugins') ) 196 wp_die( __('You do not have sufficient permissions to deactivate plugins for this site.'));196 wp_die( __( 'You aren’t allowed to deactivate plugins for this site.' ) ); 197 197 198 198 check_admin_referer('bulk-plugins'); 199 199 … … 228 228 229 229 case 'delete-selected': 230 230 if ( ! current_user_can('delete_plugins') ) { 231 wp_die( __('You do not have sufficient permissions to delete plugins for this site.'));231 wp_die( __( 'You aren’t allowed to delete plugins for this site.' ) ); 232 232 } 233 233 234 234 check_admin_referer('bulk-plugins'); -
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 permissions to edit templates for this site.').'</p>');17 if ( !current_user_can( 'edit_themes' ) ) 18 wp_die( '<p>' . __( 'You aren’t 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
12 12 13 13 wp_reset_vars( array( 'tab' ) ); 14 14 15 if ( ! current_user_can( 'install_themes') )16 wp_die( __( 'You do not have sufficient permissionsto install themes on this site.' ) );15 if ( ! current_user_can( 'install_themes' ) ) 16 wp_die( __( 'You aren’t 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/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( __( 'You aren’t allowed to update this site.' ) ); 24 24 25 25 /** 26 26 * … … 599 599 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 600 600 601 601 if ( ! current_user_can( 'update_core' ) ) 602 wp_die( __( 'You do not have sufficient permissionsto update this site.' ) );602 wp_die( __( 'You aren’t allowed to update this site.' ) ); 603 603 604 604 check_admin_referer('upgrade-core'); 605 605 … … 623 623 } elseif ( 'do-plugin-upgrade' == $action ) { 624 624 625 625 if ( ! current_user_can( 'update_plugins' ) ) 626 wp_die( __( 'You do not have sufficient permissionsto update this site.' ) );626 wp_die( __( 'You aren’t allowed to update this site.' ) ); 627 627 628 628 check_admin_referer('upgrade-core'); 629 629 … … 651 651 } elseif ( 'do-theme-upgrade' == $action ) { 652 652 653 653 if ( ! current_user_can( 'update_themes' ) ) 654 wp_die( __( 'You do not have sufficient permissionsto update this site.' ) );654 wp_die( __( 'You aren’t allowed to update this site.' ) ); 655 655 656 656 check_admin_referer('upgrade-core'); 657 657 … … 681 681 } elseif ( 'do-translation-upgrade' == $action ) { 682 682 683 683 if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) ) 684 wp_die( __( 'You do not have sufficient permissionsto update this site.' ) );684 wp_die( __( 'You aren’t allowed to update this site.' ) ); 685 685 686 686 check_admin_referer( 'upgrade-translations' ); 687 687 -
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( __( 'You aren’t allowed to update plugins for this site.' ) ); 25 25 26 26 check_admin_referer( 'bulk-update-plugins' ); 27 27 … … 47 47 48 48 } elseif ( 'upgrade-plugin' == $action ) { 49 49 if ( ! current_user_can('update_plugins') ) 50 wp_die(__('You do not have sufficient permissionsto update plugins for this site.'));50 wp_die(__('You aren’t allowed to update plugins for this site.')); 51 51 52 52 check_admin_referer('upgrade-plugin_' . $plugin); 53 53 … … 68 68 69 69 } elseif ('activate-plugin' == $action ) { 70 70 if ( ! current_user_can('update_plugins') ) 71 wp_die(__('You do not have sufficient permissionsto update plugins for this site.'));71 wp_die(__('You aren’t 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']) ) { … … 93 93 } elseif ( 'install-plugin' == $action ) { 94 94 95 95 if ( ! current_user_can('install_plugins') ) 96 wp_die( __( 'You do not have sufficient permissionsto install plugins on this site.' ) );96 wp_die( __( 'You aren’t 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( __( 'You aren’t allowed to install plugins on this site.' ) ); 145 145 } 146 146 147 147 check_admin_referer('plugin-upload'); … … 169 169 } elseif ( 'upgrade-theme' == $action ) { 170 170 171 171 if ( ! current_user_can('update_themes') ) 172 wp_die(__('You do not have sufficient permissionsto update themes for this site.'));172 wp_die(__('You aren’t 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( __( 'You aren’t allowed to update themes for this site.' ) ); 194 194 195 195 check_admin_referer( 'bulk-update-themes' ); 196 196 … … 216 216 } elseif ( 'install-theme' == $action ) { 217 217 218 218 if ( ! current_user_can('install_themes') ) 219 wp_die( __( 'You do not have sufficient permissionsto install themes on this site.' ) );219 wp_die( __( 'You aren’t 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( __( 'You aren’t allowed to install themes on this site.' ) ); 250 250 } 251 251 252 252 check_admin_referer('theme-upload'); -
wp-admin/user-edit.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( __( 'You aren’t allowed to edit this user.' ) ); 81 81 } 82 82 83 83 // Execute confirmed email change. See send_confirmation_on_profile_email(). … … 106 106 check_admin_referer('update-user_' . $user_id); 107 107 108 108 if ( !current_user_can('edit_user', $user_id) ) 109 wp_die( __('You do not have permission to edit this user.'));109 wp_die( __( 'You aren’t allowed to edit this user.' ) ); 110 110 111 111 if ( IS_PROFILE_PAGE ) { 112 112 /** … … 159 159 $profileuser = get_user_to_edit($user_id); 160 160 161 161 if ( !current_user_can('edit_user', $user_id) ) 162 wp_die( __('You do not have permission to edit this user.'));162 wp_die( __( 'You aren’t allowed to edit this user.' ) ); 163 163 164 164 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); 165 165 -
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>' . __( 'You aren’t 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>' . __( 'You aren’t 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>' . __( 'You aren’t 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>' . __( 'You aren’t allowed to create users.' ) . '</p>', 111 111 403 112 112 ); 113 113 } -
wp-includes/class-wp-xmlrpc-server.php
1233 1233 if ( 'private' === $post_data['post_status'] || ! empty( $post_data['post_password'] ) ) { 1234 1234 // Error if the client tried to stick the post, otherwise, silently unstick. 1235 1235 if ( ! empty( $post_data['sticky'] ) ) { 1236 return new IXR_Error( 401, __( ' Sorry, you cannot stick a private post.' ) );1236 return new IXR_Error( 401, __( 'You aren’t allowed to make this post private.' ) ); 1237 1237 } 1238 1238 1239 1239 if ( $update ) { … … 1241 1241 } 1242 1242 } elseif ( isset( $post_data['sticky'] ) ) { 1243 1243 if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) { 1244 return new IXR_Error( 401, __( ' Sorry, you are not allowed to stick this post.' ) );1244 return new IXR_Error( 401, __( 'You aren’t allowed to make this post sticky.' ) ); 1245 1245 } 1246 1246 1247 1247 $sticky = wp_validate_boolean( $post_data['sticky'] ); … … 1281 1281 if ( ! get_post( $post_data['ID'] ) ) 1282 1282 return new IXR_Error( 401, __( 'Invalid post ID.' ) ); 1283 1283 if ( ! current_user_can( 'edit_post', $post_data['ID'] ) ) 1284 return new IXR_Error( 401, __( ' Sorry, you are not allowed to edit this post.' ) );1284 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 1285 1285 if ( $post_data['post_type'] != get_post_type( $post_data['ID'] ) ) 1286 1286 return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); 1287 1287 } else { 1288 1288 if ( ! current_user_can( $post_type->cap->create_posts ) || ! current_user_can( $post_type->cap->edit_posts ) ) 1289 return new IXR_Error( 401, __( ' Sorry, you are not allowed to post on this site.' ) );1289 return new IXR_Error( 401, __( 'You aren’t allowed to post on this site.' ) ); 1290 1290 } 1291 1291 1292 1292 switch ( $post_data['post_status'] ) { … … 1295 1295 break; 1296 1296 case 'private': 1297 1297 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1298 return new IXR_Error( 401, __( ' Sorry, you are not allowed to create private posts in this post type' ) );1298 return new IXR_Error( 401, __( 'You aren’t allowed to create private posts in this post type.' ) ); 1299 1299 break; 1300 1300 case 'publish': 1301 1301 case 'future': 1302 1302 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1303 return new IXR_Error( 401, __( ' Sorry, you are not allowed to publish posts in this post type' ) );1303 return new IXR_Error( 401, __( 'You aren’t allowed to publish posts in this post type.' ) ); 1304 1304 break; 1305 1305 default: 1306 1306 if ( ! get_post_status_object( $post_data['post_status'] ) ) … … 1309 1309 } 1310 1310 1311 1311 if ( ! empty( $post_data['post_password'] ) && ! current_user_can( $post_type->cap->publish_posts ) ) 1312 return new IXR_Error( 401, __( ' Sorry, you are not allowed to create password protected posts in this post type' ) );1312 return new IXR_Error( 401, __( 'You aren’t allowed to create password protected posts in this post type.' ) ); 1313 1313 1314 1314 $post_data['post_author'] = absint( $post_data['post_author'] ); 1315 1315 if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) { 1316 1316 if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) 1317 return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );1317 return new IXR_Error( 401, __( 'You aren’t allowed to create posts as this user.' ) ); 1318 1318 1319 1319 $author = get_userdata( $post_data['post_author'] ); 1320 1320 … … 1380 1380 // Validating term ids. 1381 1381 foreach ( $taxonomies as $taxonomy ) { 1382 1382 if ( ! array_key_exists( $taxonomy , $post_type_taxonomies ) ) 1383 return new IXR_Error( 401, __( ' Sorry, one of the given taxonomies is not supported by the post type.' ) );1383 return new IXR_Error( 401, __( 'One of the given taxonomies is not supported by the post type.' ) ); 1384 1384 1385 1385 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->assign_terms ) ) 1386 return new IXR_Error( 401, __( ' Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) );1386 return new IXR_Error( 401, __( 'You aren’t allowed to assign a term to one of the given taxonomies.' ) ); 1387 1387 1388 1388 $term_ids = $post_data['terms'][$taxonomy]; 1389 1389 $terms[ $taxonomy ] = array(); … … 1404 1404 1405 1405 foreach ( $taxonomies as $taxonomy ) { 1406 1406 if ( ! array_key_exists( $taxonomy , $post_type_taxonomies ) ) 1407 return new IXR_Error( 401, __( ' Sorry, one of the given taxonomies is not supported by the post type.' ) );1407 return new IXR_Error( 401, __( 'One of the given taxonomies is not supported by the post type.' ) ); 1408 1408 1409 1409 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->assign_terms ) ) 1410 return new IXR_Error( 401, __( ' Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) );1410 return new IXR_Error( 401, __( 'You aren’t allowed to assign a term to one of the given taxonomies.' ) ); 1411 1411 1412 1412 /* 1413 1413 * For hierarchical taxonomies, we can't assign a term when multiple terms … … 1436 1436 if ( ! $term ) { 1437 1437 // Term doesn't exist, so check that the user is allowed to create new terms. 1438 1438 if ( ! current_user_can( $post_type_taxonomies[$taxonomy]->cap->edit_terms ) ) 1439 return new IXR_Error( 401, __( ' Sorry, you are not allowed to add a term to one of the given taxonomies.' ) );1439 return new IXR_Error( 401, __( 'You aren’t allowed to add a term to one of the given taxonomies.' ) ); 1440 1440 1441 1441 // Create the new term. 1442 1442 $term_info = wp_insert_term( $term_name, $taxonomy ); … … 1488 1488 return new IXR_Error( 500, $post_ID->get_error_message() ); 1489 1489 1490 1490 if ( ! $post_ID ) 1491 return new IXR_Error( 401, __( ' Sorry, your entry could not be posted. Something wrong happened.' ) );1491 return new IXR_Error( 401, __( 'Your entry could not be posted. Something wrong happened.' ) ); 1492 1492 1493 1493 return strval( $post_ID ); 1494 1494 } … … 1602 1602 } 1603 1603 1604 1604 if ( ! current_user_can( 'delete_post', $post_id ) ) { 1605 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto delete this post.' ) );1605 return new IXR_Error( 401, __( 'You aren’t allowed to delete this post.' ) ); 1606 1606 } 1607 1607 1608 1608 $result = wp_delete_post( $post_id ); … … 1699 1699 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 1700 1700 1701 1701 if ( ! current_user_can( 'edit_post', $post_id ) ) 1702 return new IXR_Error( 401, __( ' Sorry, you cannotedit this post.' ) );1702 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 1703 1703 1704 1704 return $this->_prepare_post( $post, $fields ); 1705 1705 } … … 1760 1760 } 1761 1761 1762 1762 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 1763 return new IXR_Error( 401, __( 'You are not allowed to edit posts in this post type.' ));1763 return new IXR_Error( 401, __( 'You aren’t allowed to edit posts in this post type.' )); 1764 1764 1765 1765 $query['post_type'] = $post_type->name; 1766 1766 … … 1843 1843 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); 1844 1844 1845 1845 if ( ! current_user_can( $taxonomy->cap->manage_terms ) ) 1846 return new IXR_Error( 401, __( 'You are not allowed to create terms in this taxonomy.' ) );1846 return new IXR_Error( 401, __( 'You aren’t allowed to create terms in this taxonomy.' ) ); 1847 1847 1848 1848 $taxonomy = (array) $taxonomy; 1849 1849 … … 1882 1882 return new IXR_Error( 500, $term->get_error_message() ); 1883 1883 1884 1884 if ( ! $term ) 1885 return new IXR_Error( 500, __( ' Sorry, yourterm could not be created. Something wrong happened.' ) );1885 return new IXR_Error( 500, __( 'The term could not be created. Something wrong happened.' ) ); 1886 1886 1887 1887 return strval( $term['term_id'] ); 1888 1888 } … … 1930 1930 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); 1931 1931 1932 1932 if ( ! current_user_can( $taxonomy->cap->edit_terms ) ) 1933 return new IXR_Error( 401, __( 'You are not allowed to edit terms in this taxonomy.' ) );1933 return new IXR_Error( 401, __( 'You aren’t allowed to edit terms in this taxonomy.' ) ); 1934 1934 1935 1935 $taxonomy = (array) $taxonomy; 1936 1936 … … 1980 1980 return new IXR_Error( 500, $term->get_error_message() ); 1981 1981 1982 1982 if ( ! $term ) 1983 return new IXR_Error( 500, __( ' Sorry, editing the term failed.' ) );1983 return new IXR_Error( 500, __( 'Failed editing the term.' ) ); 1984 1984 1985 1985 return true; 1986 1986 } … … 2026 2026 $taxonomy = get_taxonomy( $taxonomy ); 2027 2027 2028 2028 if ( ! current_user_can( $taxonomy->cap->delete_terms ) ) 2029 return new IXR_Error( 401, __( 'You are not allowed to delete terms in this taxonomy.' ) );2029 return new IXR_Error( 401, __( 'You aren’t allowed to delete terms in this taxonomy.' ) ); 2030 2030 2031 2031 $term = get_term( $term_id, $taxonomy->name ); 2032 2032 … … 2042 2042 return new IXR_Error( 500, $term->get_error_message() ); 2043 2043 2044 2044 if ( ! $result ) 2045 return new IXR_Error( 500, __( ' Sorry, deleting the term failed.' ) );2045 return new IXR_Error( 500, __( 'Failed deleting the term.' ) ); 2046 2046 2047 2047 return $result; 2048 2048 } … … 2097 2097 $taxonomy = get_taxonomy( $taxonomy ); 2098 2098 2099 2099 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2100 return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );2100 return new IXR_Error( 401, __( 'You aren’t allowed to assign terms in this taxonomy.' ) ); 2101 2101 2102 2102 $term = get_term( $term_id , $taxonomy->name, ARRAY_A ); 2103 2103 … … 2155 2155 $taxonomy = get_taxonomy( $taxonomy ); 2156 2156 2157 2157 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2158 return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );2158 return new IXR_Error( 401, __( 'You aren’t allowed to assign terms in this taxonomy.' ) ); 2159 2159 2160 2160 $query = array(); 2161 2161 … … 2250 2250 $taxonomy = get_taxonomy( $taxonomy ); 2251 2251 2252 2252 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 2253 return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );2253 return new IXR_Error( 401, __( 'You aren’t allowed to assign terms in this taxonomy.' ) ); 2254 2254 2255 2255 return $this->_prepare_taxonomy( $taxonomy, $fields ); 2256 2256 } … … 2380 2380 do_action( 'xmlrpc_call', 'wp.getUser' ); 2381 2381 2382 2382 if ( ! current_user_can( 'edit_user', $user_id ) ) 2383 return new IXR_Error( 401, __( ' Sorry, you cannotedit users.' ) );2383 return new IXR_Error( 401, __( 'You aren’t allowed to edit users.' ) ); 2384 2384 2385 2385 $user_data = get_userdata( $user_id ); 2386 2386 … … 2438 2438 do_action( 'xmlrpc_call', 'wp.getUsers' ); 2439 2439 2440 2440 if ( ! current_user_can( 'list_users' ) ) 2441 return new IXR_Error( 401, __( 'You are not allowed to browse users.' ) );2441 return new IXR_Error( 401, __( 'You aren’t allowed to browse users.' ) ); 2442 2442 2443 2443 $query = array( 'fields' => 'all_with_meta' ); 2444 2444 … … 2511 2511 do_action( 'xmlrpc_call', 'wp.getProfile' ); 2512 2512 2513 2513 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2514 return new IXR_Error( 401, __( ' Sorry, you cannotedit your profile.' ) );2514 return new IXR_Error( 401, __( 'You aren’t allowed to edit your profile.' ) ); 2515 2515 2516 2516 $user_data = get_userdata( $user->ID ); 2517 2517 … … 2557 2557 do_action( 'xmlrpc_call', 'wp.editProfile' ); 2558 2558 2559 2559 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2560 return new IXR_Error( 401, __( ' Sorry, you cannotedit your profile.' ) );2560 return new IXR_Error( 401, __( 'You aren’t allowed to edit your profile.' ) ); 2561 2561 2562 2562 // holds data of the user 2563 2563 $user_data = array(); … … 2591 2591 return new IXR_Error( 500, $result->get_error_message() ); 2592 2592 2593 2593 if ( ! $result ) 2594 return new IXR_Error( 500, __( ' Sorry, the user cannot be updated.' ) );2594 return new IXR_Error( 500, __( 'The user cannot be updated.' ) ); 2595 2595 2596 2596 return true; 2597 2597 } … … 2627 2627 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 2628 2628 2629 2629 if ( !current_user_can( 'edit_page', $page_id ) ) 2630 return new IXR_Error( 401, __( ' Sorry, you cannotedit this page.' ) );2630 return new IXR_Error( 401, __( 'You aren’t allowed to edit this page.' ) ); 2631 2631 2632 2632 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2633 2633 do_action( 'xmlrpc_call', 'wp.getPage' ); … … 2668 2668 return $this->error; 2669 2669 2670 2670 if ( !current_user_can( 'edit_pages' ) ) 2671 return new IXR_Error( 401, __( ' Sorry, you cannotedit pages.' ) );2671 return new IXR_Error( 401, __( 'You aren’t allowed to edit pages.' ) ); 2672 2672 2673 2673 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2674 2674 do_action( 'xmlrpc_call', 'wp.getPages' ); … … 2762 2762 2763 2763 // Make sure the user can delete pages. 2764 2764 if ( !current_user_can('delete_page', $page_id) ) 2765 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto delete this page.' ) );2765 return new IXR_Error( 401, __( 'You aren’t allowed to delete this page.' ) ); 2766 2766 2767 2767 // Attempt to delete the page. 2768 2768 $result = wp_delete_post($page_id); … … 2824 2824 2825 2825 // Make sure the user is allowed to edit pages. 2826 2826 if ( !current_user_can('edit_page', $page_id) ) 2827 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto edit this page.' ) );2827 return new IXR_Error( 401, __( 'You aren’t allowed to edit this page.' ) ); 2828 2828 2829 2829 // Mark this as content for a page. 2830 2830 $content['post_type'] = 'page'; … … 2870 2870 return $this->error; 2871 2871 2872 2872 if ( !current_user_can( 'edit_pages' ) ) 2873 return new IXR_Error( 401, __( ' Sorry, you cannotedit pages.' ) );2873 return new IXR_Error( 401, __( 'You aren’t allowed to edit pages.' ) ); 2874 2874 2875 2875 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2876 2876 do_action( 'xmlrpc_call', 'wp.getPageList' ); … … 2926 2926 return $this->error; 2927 2927 2928 2928 if ( !current_user_can('edit_posts') ) 2929 return new IXR_Error( 401, __( ' Sorry, you cannotedit posts on this site.' ) );2929 return new IXR_Error( 401, __( 'You aren’t allowed to edit posts on this site.' ) ); 2930 2930 2931 2931 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2932 2932 do_action( 'xmlrpc_call', 'wp.getAuthors' ); … … 2967 2967 return $this->error; 2968 2968 2969 2969 if ( !current_user_can( 'edit_posts' ) ) 2970 return new IXR_Error( 401, __( ' Sorry, you must be able to edit posts on this site in order to view tags.' ) );2970 return new IXR_Error( 401, __( 'You must be able to edit posts on this site in order to view tags.' ) ); 2971 2971 2972 2972 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2973 2973 do_action( 'xmlrpc_call', 'wp.getKeywords' ); … … 3021 3021 3022 3022 // Make sure the user is allowed to add a category. 3023 3023 if ( !current_user_can('manage_categories') ) 3024 return new IXR_Error(401, __(' Sorry, you do not have the rightto add a category.'));3024 return new IXR_Error(401, __('You aren’t allowed to add a category.')); 3025 3025 3026 3026 // If no slug was provided make it empty so that 3027 3027 // WordPress will generate one. … … 3096 3096 do_action( 'xmlrpc_call', 'wp.deleteCategory' ); 3097 3097 3098 3098 if ( !current_user_can('manage_categories') ) 3099 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto delete a category.' ) );3099 return new IXR_Error( 401, __( 'You aren’t allowed to delete a category.' ) ); 3100 3100 3101 3101 $status = wp_delete_term( $category_id, 'category' ); 3102 3102 … … 3143 3143 return $this->error; 3144 3144 3145 3145 if ( !current_user_can( 'edit_posts' ) ) 3146 return new IXR_Error( 401, __( ' Sorry, you must be able to edit posts on this site in order to view categories.' ) );3146 return new IXR_Error( 401, __( 'You must be able to edit posts on this site in order to view categories.' ) ); 3147 3147 3148 3148 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3149 3149 do_action( 'xmlrpc_call', 'wp.suggestCategories' ); … … 3194 3194 } 3195 3195 3196 3196 if ( ! current_user_can( 'edit_comment', $comment_id ) ) { 3197 return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );3197 return new IXR_Error( 403, __( 'You aren’t allowed to moderate or edit this comment.' ) ); 3198 3198 } 3199 3199 3200 3200 return $this->_prepare_comment( $comment ); … … 3327 3327 } 3328 3328 3329 3329 if ( !current_user_can( 'edit_comment', $comment_ID ) ) { 3330 return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );3330 return new IXR_Error( 403, __( 'You aren’t allowed to moderate or edit this comment.' ) ); 3331 3331 } 3332 3332 3333 3333 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 3394 3394 } 3395 3395 3396 3396 if ( ! current_user_can( 'edit_comment', $comment_ID ) ) { 3397 return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );3397 return new IXR_Error( 403, __( 'You aren’t allowed to moderate or edit this comment.' ) ); 3398 3398 } 3399 3399 3400 3400 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 3437 3437 return new IXR_Error(500, $result->get_error_message()); 3438 3438 3439 3439 if ( !$result ) 3440 return new IXR_Error(500, __(' Sorry, the comment could not be edited. Something wrong happened.'));3440 return new IXR_Error(500, __('The comment could not be edited. Something wrong happened.')); 3441 3441 3442 3442 /** 3443 3443 * Fires after a comment has been successfully updated via XML-RPC. … … 3513 3513 } 3514 3514 3515 3515 if ( ! comments_open( $post_id ) ) { 3516 return new IXR_Error( 403, __( ' Sorry, comments are closed for this item.' ) );3516 return new IXR_Error( 403, __( 'Comments are closed for this item.' ) ); 3517 3517 } 3518 3518 3519 3519 $comment = array(); … … 3837 3837 return $this->error; 3838 3838 3839 3839 if ( !current_user_can( 'manage_options' ) ) 3840 return new IXR_Error( 403, __( 'You are not allowed to update options.' ) );3840 return new IXR_Error( 403, __( 'You aren’t allowed to update options.' ) ); 3841 3841 3842 3842 $option_names = array(); 3843 3843 foreach ( $options as $o_name => $o_value ) { … … 3889 3889 return $this->error; 3890 3890 3891 3891 if ( !current_user_can( 'upload_files' ) ) 3892 return new IXR_Error( 403, __( 'You do not have permissionto upload files.' ) );3892 return new IXR_Error( 403, __( 'You aren’t allowed to upload files.' ) ); 3893 3893 3894 3894 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3895 3895 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); … … 3937 3937 return $this->error; 3938 3938 3939 3939 if ( !current_user_can( 'upload_files' ) ) 3940 return new IXR_Error( 401, __( 'You do not have permissionto upload files.' ) );3940 return new IXR_Error( 401, __( 'You aren’t allowed to upload files.' ) ); 3941 3941 3942 3942 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3943 3943 do_action( 'xmlrpc_call', 'wp.getMediaLibrary' ); … … 4069 4069 $post_type = get_post_type_object( $post_type_name ); 4070 4070 4071 4071 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 4072 return new IXR_Error( 401, __( ' Sorry, you are not allowed to edit this post type.' ) );4072 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post type.' ) ); 4073 4073 4074 4074 return $this->_prepare_post_type( $post_type, $fields ); 4075 4075 } … … 4185 4185 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4186 4186 4187 4187 if ( ! current_user_can( 'edit_post', $post_id ) ) 4188 return new IXR_Error( 401, __( ' Sorry, you are not allowed to edit posts.' ) );4188 return new IXR_Error( 401, __( 'You aren’t allowed to edit posts.' ) ); 4189 4189 4190 4190 // Check if revisions are enabled. 4191 4191 if ( ! wp_revisions_enabled( $post ) ) … … 4255 4255 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4256 4256 4257 4257 if ( ! current_user_can( 'edit_post', $revision->post_parent ) ) 4258 return new IXR_Error( 401, __( ' Sorry, you cannotedit this post.' ) );4258 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 4259 4259 4260 4260 // Check if revisions are disabled. 4261 4261 if ( ! wp_revisions_enabled( $post ) ) … … 4371 4371 return $this->error; 4372 4372 4373 4373 if ( !current_user_can( 'edit_posts' ) ) 4374 return new IXR_Error( 401, __( ' Sorry, you do not have access to user data on this site.' ) );4374 return new IXR_Error( 401, __( 'You do not have access to user data on this site.' ) ); 4375 4375 4376 4376 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4377 4377 do_action( 'xmlrpc_call', 'blogger.getUserInfo' ); … … 4417 4417 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 4418 4418 4419 4419 if ( !current_user_can( 'edit_post', $post_ID ) ) 4420 return new IXR_Error( 401, __( ' Sorry, you cannotedit this post.' ) );4420 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 4421 4421 4422 4422 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4423 4423 do_action( 'xmlrpc_call', 'blogger.getPost' ); … … 4470 4470 return $this->error; 4471 4471 4472 4472 if ( ! current_user_can( 'edit_posts' ) ) 4473 return new IXR_Error( 401, __( ' Sorry, you cannotedit posts on this site.' ) );4473 return new IXR_Error( 401, __( 'You aren’t allowed to edit posts on this site.' ) ); 4474 4474 4475 4475 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4476 4476 do_action( 'xmlrpc_call', 'blogger.getRecentPosts' ); … … 4513 4513 * @return IXR_Error 4514 4514 */ 4515 4515 public function blogger_getTemplate($args) { 4516 return new IXR_Error( 403, __(' Sorry, that file cannot be edited.' ) );4516 return new IXR_Error( 403, __('That file cannot be edited.' ) ); 4517 4517 } 4518 4518 4519 4519 /** … … 4524 4524 * @return IXR_Error 4525 4525 */ 4526 4526 public function blogger_setTemplate($args) { 4527 return new IXR_Error( 403, __(' Sorry, that file cannot be edited.' ) );4527 return new IXR_Error( 403, __('That file cannot be edited.' ) ); 4528 4528 } 4529 4529 4530 4530 /** … … 4560 4560 4561 4561 $cap = ($publish) ? 'publish_posts' : 'edit_posts'; 4562 4562 if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) || !current_user_can($cap) ) 4563 return new IXR_Error(401, __(' Sorry, you are not allowed to post on this site.'));4563 return new IXR_Error(401, __('You aren’t allowed to post on this site.')); 4564 4564 4565 4565 $post_status = ($publish) ? 'publish' : 'draft'; 4566 4566 … … 4580 4580 return new IXR_Error(500, $post_ID->get_error_message()); 4581 4581 4582 4582 if ( !$post_ID ) 4583 return new IXR_Error(500, __(' Sorry, your entry could not be posted. Something wrong happened.'));4583 return new IXR_Error(500, __('Your entry could not be posted. Something wrong happened.')); 4584 4584 4585 4585 $this->attach_uploads( $post_ID, $post_content ); 4586 4586 … … 4640 4640 $this->escape($actual_post); 4641 4641 4642 4642 if ( ! current_user_can( 'edit_post', $post_ID ) ) { 4643 return new IXR_Error(401, __(' Sorry, you do not have the rightto edit this post.'));4643 return new IXR_Error(401, __('You aren’t allowed to edit this post.')); 4644 4644 } 4645 4645 if ( 'publish' == $actual_post['post_status'] && ! current_user_can( 'publish_posts' ) ) { 4646 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto publish this post.' ) );4646 return new IXR_Error( 401, __( 'You aren’t allowed to publish this post.' ) ); 4647 4647 } 4648 4648 4649 4649 $postdata = array(); … … 4710 4710 } 4711 4711 4712 4712 if ( ! current_user_can( 'delete_post', $post_ID ) ) { 4713 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto delete this post.' ) );4713 return new IXR_Error( 401, __( 'You aren’t allowed to delete this post.' ) ); 4714 4714 } 4715 4715 4716 4716 $result = wp_delete_post( $post_ID ); … … 4797 4797 $cap = 'publish_pages'; 4798 4798 else 4799 4799 $cap = 'edit_pages'; 4800 $error_message = __( ' Sorry, you are not allowed to publish pages on this site.' );4800 $error_message = __( 'You aren’t allowed to publish pages on this site.' ); 4801 4801 $post_type = 'page'; 4802 4802 if ( !empty( $content_struct['wp_page_template'] ) ) 4803 4803 $page_template = $content_struct['wp_page_template']; … … 4808 4808 $cap = 'publish_posts'; 4809 4809 else 4810 4810 $cap = 'edit_posts'; 4811 $error_message = __( ' Sorry, you are not allowed to publish posts on this site.' );4811 $error_message = __( 'You aren’t allowed to publish posts on this site.' ); 4812 4812 $post_type = 'post'; 4813 4813 } else { 4814 4814 // No other post_type values are allowed here … … 4821 4821 $cap = 'publish_posts'; 4822 4822 else 4823 4823 $cap = 'edit_posts'; 4824 $error_message = __( ' Sorry, you are not allowed to publish posts on this site.' );4824 $error_message = __( 'You aren’t allowed to publish posts on this site.' ); 4825 4825 $post_type = 'post'; 4826 4826 } 4827 4827 4828 4828 if ( ! current_user_can( get_post_type_object( $post_type )->cap->create_posts ) ) 4829 return new IXR_Error( 401, __( ' Sorry, you are not allowed to publish posts on this site.' ) );4829 return new IXR_Error( 401, __( 'You aren’t allowed to publish posts on this site.' ) ); 4830 4830 if ( !current_user_can( $cap ) ) 4831 4831 return new IXR_Error( 401, $error_message ); 4832 4832 … … 4863 4863 switch ( $post_type ) { 4864 4864 case "post": 4865 4865 if ( !current_user_can( 'edit_others_posts' ) ) 4866 return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );4866 return new IXR_Error( 401, __( 'You aren’t allowed to create posts as this user.' ) ); 4867 4867 break; 4868 4868 case "page": 4869 4869 if ( !current_user_can( 'edit_others_pages' ) ) 4870 return new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) );4870 return new IXR_Error( 401, __( 'You aren’t allowed to create pages as this user.' ) ); 4871 4871 break; 4872 4872 default: 4873 4873 return new IXR_Error( 401, __( 'Invalid post type' ) ); … … 5039 5039 return new IXR_Error(500, $post_ID->get_error_message()); 5040 5040 5041 5041 if ( !$post_ID ) 5042 return new IXR_Error(500, __(' Sorry, your entry could not be posted. Something wrong happened.'));5042 return new IXR_Error(500, __('Your entry could not be posted. Something wrong happened.')); 5043 5043 5044 5044 /** 5045 5045 * Fires after a new post has been successfully created via the XML-RPC MovableType API. … … 5140 5140 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5141 5141 5142 5142 if ( ! current_user_can( 'edit_post', $post_ID ) ) 5143 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto edit this post.' ) );5143 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 5144 5144 5145 5145 // Use wp.editPost to edit post types other than post and page. 5146 5146 if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) … … 5199 5199 switch ( $post_type ) { 5200 5200 case 'post': 5201 5201 if ( ! current_user_can( 'edit_others_posts' ) ) { 5202 return new IXR_Error( 401, __( 'You are not allowed to change the post author as this user.' ) );5202 return new IXR_Error( 401, __( 'You aren’t allowed to change the post author as this user.' ) ); 5203 5203 } 5204 5204 break; 5205 5205 case 'page': 5206 5206 if ( ! current_user_can( 'edit_others_pages' ) ) { 5207 return new IXR_Error( 401, __( 'You are not allowed to change the page author as this user.' ) );5207 return new IXR_Error( 401, __( 'You aren’t allowed to change the page author as this user.' ) ); 5208 5208 } 5209 5209 break; 5210 5210 default: … … 5311 5311 5312 5312 if ( 'publish' == $post_status || 'private' == $post_status ) { 5313 5313 if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) { 5314 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto publish this page.' ) );5314 return new IXR_Error( 401, __( 'You aren’t allowed to publish this page.' ) ); 5315 5315 } elseif ( ! current_user_can( 'publish_posts' ) ) { 5316 return new IXR_Error( 401, __( ' Sorry, you do not have the rightto publish this post.' ) );5316 return new IXR_Error( 401, __( 'You aren’t allowed to publish this post.' ) ); 5317 5317 } 5318 5318 } 5319 5319 … … 5350 5350 return new IXR_Error(500, $result->get_error_message()); 5351 5351 5352 5352 if ( !$result ) 5353 return new IXR_Error(500, __(' Sorry, your entry could not be edited. Something wrong happened.'));5353 return new IXR_Error(500, __('Your entry could not be edited. Something wrong happened.')); 5354 5354 5355 5355 // Only posts can be sticky 5356 5356 if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) { … … 5431 5431 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5432 5432 5433 5433 if ( !current_user_can( 'edit_post', $post_ID ) ) 5434 return new IXR_Error( 401, __( ' Sorry, you cannotedit this post.' ) );5434 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 5435 5435 5436 5436 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5437 5437 do_action( 'xmlrpc_call', 'metaWeblog.getPost' ); … … 5561 5561 return $this->error; 5562 5562 5563 5563 if ( ! current_user_can( 'edit_posts' ) ) 5564 return new IXR_Error( 401, __( ' Sorry, you cannotedit posts on this site.' ) );5564 return new IXR_Error( 401, __( 'You aren’t allowed to edit posts on this site.' ) ); 5565 5565 5566 5566 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5567 5567 do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts' ); … … 5674 5674 return $this->error; 5675 5675 5676 5676 if ( !current_user_can( 'edit_posts' ) ) 5677 return new IXR_Error( 401, __( ' Sorry, you must be able to edit posts on this site in order to view categories.' ) );5677 return new IXR_Error( 401, __( 'You must be able to edit posts on this site in order to view categories.' ) ); 5678 5678 5679 5679 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5680 5680 do_action( 'xmlrpc_call', 'metaWeblog.getCategories' ); … … 5738 5738 do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' ); 5739 5739 5740 5740 if ( !current_user_can('upload_files') ) { 5741 $this->error = new IXR_Error( 401, __( 'You do not have permissionto upload files.' ) );5741 $this->error = new IXR_Error( 401, __( 'You aren’t allowed to upload files.' ) ); 5742 5742 return $this->error; 5743 5743 } 5744 5744 5745 5745 if ( is_multisite() && upload_is_user_over_quota( false ) ) { 5746 $this->error = new IXR_Error( 401, __( ' Sorry, you have used your space allocation.' ) );5746 $this->error = new IXR_Error( 401, __( 'You have used your space allocation.' ) ); 5747 5747 return $this->error; 5748 5748 } 5749 5749 … … 5772 5772 $post_id = (int) $data['post_id']; 5773 5773 5774 5774 if ( ! current_user_can( 'edit_post', $post_id ) ) 5775 return new IXR_Error( 401, __( ' Sorry, you cannotedit this post.' ) );5775 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 5776 5776 } 5777 5777 $attachment = array( 5778 5778 'post_title' => $name, … … 5895 5895 return $this->error; 5896 5896 5897 5897 if ( !current_user_can( 'edit_posts' ) ) 5898 return new IXR_Error( 401, __( ' Sorry, you must be able to edit posts on this site in order to view categories.' ) );5898 return new IXR_Error( 401, __( 'You must be able to edit posts on this site in order to view categories.' ) ); 5899 5899 5900 5900 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5901 5901 do_action( 'xmlrpc_call', 'mt.getCategoryList' ); … … 5943 5943 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5944 5944 5945 5945 if ( !current_user_can( 'edit_post', $post_ID ) ) 5946 return new IXR_Error( 401, __( ' Sorry, you can notedit this post.' ) );5946 return new IXR_Error( 401, __( 'You aren’t allowed to edit this post.' ) ); 5947 5947 5948 5948 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5949 5949 do_action( 'xmlrpc_call', 'mt.getPostCategories' ); … … 5997 5997 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 5998 5998 5999 5999 if ( !current_user_can('edit_post', $post_ID) ) 6000 return new IXR_Error(401, __(' Sorry, you cannotedit this post.'));6000 return new IXR_Error(401, __('You aren’t allowed to edit this post.')); 6001 6001 6002 6002 $catids = array(); 6003 6003 foreach ( $categories as $cat ) { … … 6116 6116 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 6117 6117 6118 6118 if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) ) 6119 return new IXR_Error(401, __(' Sorry, you cannotpublish this post.'));6119 return new IXR_Error(401, __('You aren’t allowed to publish this post.')); 6120 6120 6121 6121 $postdata['post_status'] = 'publish'; 6122 6122 -
wp-includes/rest-api/class-wp-rest-server.php
812 812 if ( is_wp_error( $permission ) ) { 813 813 $response = $permission; 814 814 } else if ( false === $permission || null === $permission ) { 815 $response = new WP_Error( 'rest_forbidden', __( "You don't have permission to do this."), array( 'status' => 403 ) );815 $response = new WP_Error( 'rest_forbidden', __( 'You aren’t allowed to do this.' ), array( 'status' => 403 ) ); 816 816 } 817 817 } 818 818 } -
wp-includes/revision.php
523 523 $id = (int) $_GET['preview_id']; 524 524 525 525 if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) 526 wp_die( __( 'You do not have permission to preview drafts.') );526 wp_die( __( 'You aren’t allowed to preview drafts.' ) ); 527 527 528 528 add_filter('the_preview', '_set_preview'); 529 529 } -
wp-includes/script-loader.php
129 129 130 130 $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 ); 131 131 did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array( 132 'noPerm' => __('You do not have permissionto do that.'),132 'noPerm' => __('You aren’t allowed to do that.'), 133 133 'broken' => __('An unidentified error has occurred.') 134 134 ) ); 135 135 … … 438 438 'cancel' => __( 'Cancel' ), 439 439 'close' => __( 'Close' ), 440 440 'cheatin' => __( 'Cheatin’ uh?' ), 441 'notAllowed' => __( 'You are not allowed to customize the appearance of this site.' ),441 'notAllowed' => __( 'You aren’t allowed to customize the appearance of this site.' ), 442 442 'previewIframeTitle' => __( 'Site Preview' ), 443 443 'loginIframeTitle' => __( 'Session expired' ), 444 444 'collapseSidebar' => __( 'Collapse Sidebar' ), … … 476 476 if ( is_admin() ) { 477 477 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); 478 478 did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array( 479 'noPerm' => __('You do not have permissionto do that.'),479 'noPerm' => __('You aren’t allowed to do that.'), 480 480 'broken' => __('An unidentified error has occurred.') 481 481 )); 482 482