Make WordPress Core

Ticket #34521: 34521.3.patch

File 34521.3.patch, 128.6 KB (added by Presskopp, 10 years ago)
  • wp-admin/admin.php

     
    271271
    272272        $importer = $_GET['import'];
    273273
    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.'));
    276276
    277277        if ( validate_file($importer) ) {
    278278                wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
  • wp-admin/async-upload.php

     
    4545}
    4646
    4747if ( ! current_user_can( 'upload_files' ) ) {
    48         wp_die( __( 'You do not have permission to upload files.' ) );
     48        wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
    4949}
    5050
    5151// just fetch the detail form for that attachment
     
    5454        if ( 'attachment' != $post->post_type )
    5555                wp_die( __( 'Unknown post type.' ) );
    5656        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.' ) );
    5858
    5959        switch ( $_REQUEST['fetch'] ) {
    6060                case 3 :
  • wp-admin/comment.php

     
    6161                comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
    6262
    6363        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.') );
    6565
    6666        if ( 'trash' == $comment->comment_approved )
    6767                comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
     
    254254        if ( !$comment = get_comment($comment_id) )
    255255                comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
    256256        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.') );
    258258
    259259        if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
    260260                $redir = wp_get_referer();
  • wp-admin/custom-background.php

     
    464464         * @deprecated 3.5.0
    465465         */
    466466        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;
    468468                $attachment_id = absint($_POST['attachment_id']);
    469469                /** This filter is documented in wp-admin/includes/media.php */
    470470                $sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) ));
  • wp-admin/custom-header.php

     
    188188         * @since 2.6.0
    189189         */
    190190        public function take_action() {
    191                 if ( ! current_user_can('edit_theme_options') )
     191                if ( ! current_user_can( 'edit_theme_options' ) )
    192192                        return;
    193193
    194194                if ( empty( $_POST ) )
     
    965965         * @since 2.1.0
    966966         */
    967967        public function admin_page() {
    968                 if ( ! current_user_can('edit_theme_options') )
    969                         wp_die(__('You do not have permission to customize headers.'));
     968                if ( ! current_user_can( 'edit_theme_options' ) )
     969                        wp_die(__('Sorry, you are not allowed to customize headers.'));
    970970                $step = $this->step();
    971971                if ( 2 == $step )
    972972                        $this->step_2();
  • wp-admin/customize.php

     
    1515if ( ! current_user_can( 'customize' ) ) {
    1616        wp_die(
    1717                '<h1>' . __( 'Cheatin&#8217; 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>',
    1919                403
    2020        );
    2121}
  • wp-admin/edit-comments.php

     
    1111if ( ! current_user_can( 'edit_posts' ) ) {
    1212        wp_die(
    1313                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    14                 '<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
     14                '<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
    1515                403
    1616        );
    1717}
     
    210210                        $error_msg = __( 'Invalid comment ID.' );
    211211                        break;
    212212                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.' );
    214214                        break;
    215215        }
    216216        if ( $error_msg )
  • wp-admin/edit-tags.php

     
    1818        wp_die( __( 'Invalid taxonomy' ) );
    1919
    2020if ( ! 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.' ) );
    2222}
    2323
    2424if ( ! current_user_can( $tax->cap->manage_terms ) ) {
    2525        wp_die(
    2626                '<h1>' . __( 'Cheatin&#8217; 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>',
    2828                403
    2929        );
    3030}
     
    7171        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    7272                wp_die(
    7373                        '<h1>' . __( 'Cheatin&#8217; 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>',
    7575                        403
    7676                );
    7777        }
     
    111111        if ( ! current_user_can( $tax->cap->delete_terms ) ) {
    112112                wp_die(
    113113                        '<h1>' . __( 'Cheatin&#8217; 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>',
    115115                        403
    116116                );
    117117        }
     
    128128        if ( ! current_user_can( $tax->cap->delete_terms ) ) {
    129129                wp_die(
    130130                        '<h1>' . __( 'Cheatin&#8217; 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>',
    132132                        403
    133133                );
    134134        }
     
    171171        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    172172                wp_die(
    173173                        '<h1>' . __( 'Cheatin&#8217; 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>',
    175175                        403
    176176                );
    177177        }
     
    288288if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    289289        wp_die(
    290290                '<h1>' . __( 'Cheatin&#8217; 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>',
    292292                403
    293293        );
    294294}
  • wp-admin/edit.php

     
    1313        wp_die( __( 'Invalid post type' ) );
    1414
    1515if ( ! 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.' ) );
    1717}
    1818
    1919if ( 'attachment' === $typenow ) {
     
    3737if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
    3838        wp_die(
    3939                '<h1>' . __( 'Cheatin&#8217; 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>',
    4141                403
    4242        );
    4343}
     
    103103
    104104                        foreach ( (array) $post_ids as $post_id ) {
    105105                                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.') );
    107107
    108108                                if ( wp_check_post_lock( $post_id ) ) {
    109109                                        $locked++;
     
    122122                        $untrashed = 0;
    123123                        foreach ( (array) $post_ids as $post_id ) {
    124124                                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.') );
    126126
    127127                                if ( !wp_untrash_post($post_id) )
    128128                                        wp_die( __('Error in restoring from Trash.') );
     
    137137                                $post_del = get_post($post_id);
    138138
    139139                                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.') );
    141141
    142142                                if ( $post_del->post_type == 'attachment' ) {
    143143                                        if ( ! wp_delete_attachment($post_id) )
  • wp-admin/export.php

     
    99/** Load WordPress Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( !current_user_can('export') )
    13         wp_die(__('You do not have sufficient permissions to export the content of this site.'));
     12if ( !current_user_can( 'export' ) )
     13        wp_die(__('Sorry, you are not allowed to export the content of this site.'));
    1414
    1515/** Load WordPress export API */
    1616require_once( ABSPATH . 'wp-admin/includes/export.php' );
  • wp-admin/import.php

     
    1111/** Load WordPress Bootstrap */
    1212require_once( dirname( __FILE__ ) . '/admin.php' );
    1313
    14 if ( !current_user_can('import') )
    15         wp_die(__('You do not have sufficient permissions to import content in this site.'));
     14if ( !current_user_can( 'import' ) )
     15        wp_die(__('Sorry, you are not allowed to import content in this site.'));
    1616
    1717$title = __('Import');
    1818
     
    124124<?php
    125125}
    126126
    127 if ( current_user_can('install_plugins') )
     127if ( current_user_can( 'install_plugins' ) )
    128128        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>';
    129129?>
    130130
  • wp-admin/includes/ajax-actions.php

     
    13211321                $action = 'add-user';
    13221322
    13231323        check_ajax_referer( $action );
    1324         if ( ! current_user_can('create_users') )
     1324        if ( ! current_user_can( 'create_users' ) )
    13251325                wp_die( -1 );
    13261326        if ( ! $user_id = edit_user() ) {
    13271327                wp_die( 0 );
     
    16051605
    16061606        if ( 'page' == $_POST['post_type'] ) {
    16071607                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.' ) );
    16091609        } else {
    16101610                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.' ) );
    16121612        }
    16131613
    16141614        if ( $last = wp_check_post_lock( $post_ID ) ) {
     
    18121812function wp_ajax_widgets_order() {
    18131813        check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
    18141814
    1815         if ( !current_user_can('edit_theme_options') )
     1815        if ( !current_user_can( 'edit_theme_options' ) )
    18161816                wp_die( -1 );
    18171817
    18181818        unset( $_POST['savewidgets'], $_POST['action'] );
     
    18541854
    18551855        check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
    18561856
    1857         if ( !current_user_can('edit_theme_options') || !isset($_POST['id_base']) )
     1857        if ( !current_user_can( 'edit_theme_options' ) || !isset($_POST['id_base']) )
    18581858                wp_die( -1 );
    18591859
    18601860        unset( $_POST['savewidgets'], $_POST['action'] );
     
    20012001                echo wp_json_encode( array(
    20022002                        'success' => false,
    20032003                        'data'    => array(
    2004                                 'message'  => __( 'You do not have permission to upload files.' ),
     2004                                'message'  => __( 'Sorry, you are not allowed to upload files.' ),
    20052005                                'filename' => $_FILES['async-upload']['name'],
    20062006                        )
    20072007                ) );
     
    20152015                        echo wp_json_encode( array(
    20162016                                'success' => false,
    20172017                                'data'    => array(
    2018                                         'message'  => __( "You don't have permission to attach files to this post." ),
     2018                                        'message'  => __( "Sorry, you are not allowed to attach files to this post." ),
    20192019                                        'filename' => $_FILES['async-upload']['name'],
    20202020                                )
    20212021                        ) );
     
    30903090        }
    30913091
    30923092        if ( ! current_user_can( 'update_plugins' ) ) {
    3093                 $status['error'] = __( 'You do not have sufficient permissions to update plugins for this site.' );
     3093                $status['error'] = __( 'Sorry, you are not allowed to update plugins for this site.' );
    30943094                wp_send_json_error( $status );
    30953095        }
    30963096
  • wp-admin/includes/bookmark.php

     
    2929        if ( ! current_user_can( 'manage_links' ) ) {
    3030                wp_die(
    3131                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    32                         '<p>' . __( 'You do not have sufficient permissions to edit the links for this site.' ) . '</p>',
     32                        '<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>',
    3333                        403
    3434                );
    3535        }
     
    312312                wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );
    313313        }
    314314
    315         wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
     315        wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
    316316}
  • wp-admin/includes/class-wp-comments-list-table.php

     
    6464         * @return bool
    6565         */
    6666        public function ajax_user_can() {
    67                 return current_user_can('edit_posts');
     67                return current_user_can( 'edit_posts' );
    6868        }
    6969
    7070        /**
  • wp-admin/includes/class-wp-media-list-table.php

     
    5858         * @return bool
    5959         */
    6060        public function ajax_user_can() {
    61                 return current_user_can('upload_files');
     61                return current_user_can( 'upload_files' );
    6262        }
    6363
    6464        /**
  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    443443                        );
    444444                }
    445445
    446                 if ( current_user_can('edit_themes') ) {
     446                if ( current_user_can( 'edit_themes' ) ) {
    447447                        $url = add_query_arg( array(
    448448                                'theme' => $theme_key,
    449449                        ), 'theme-editor.php' );
  • wp-admin/includes/class-wp-plugin-install-list-table.php

     
    2828         * @return bool
    2929         */
    3030        public function ajax_user_can() {
    31                 return current_user_can('install_plugins');
     31                return current_user_can( 'install_plugins' );
    3232        }
    3333
    3434        /**
  • wp-admin/includes/class-wp-plugins-list-table.php

     
    5959         * @return bool
    6060         */
    6161        public function ajax_user_can() {
    62                 return current_user_can('activate_plugins');
     62                return current_user_can( 'activate_plugins' );
    6363        }
    6464
    6565        /**
  • wp-admin/includes/comment.php

     
    4646 */
    4747function edit_comment() {
    4848        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.' ) );
    5050
    5151        if ( isset( $_POST['newcomment_author'] ) )
    5252                $_POST['comment_author'] = $_POST['newcomment_author'];
  • wp-admin/includes/dashboard.php

     
    3535        }
    3636
    3737        // Right Now
    38         if ( is_blog_admin() && current_user_can('edit_posts') )
     38        if ( is_blog_admin() && current_user_can( 'edit_posts' ) )
    3939                wp_add_dashboard_widget( 'dashboard_right_now', __( 'At a Glance' ), 'wp_dashboard_right_now' );
    4040
    4141        if ( is_network_admin() )
     
    376376 */
    377377function wp_network_dashboard_right_now() {
    378378        $actions = array();
    379         if ( current_user_can('create_sites') )
     379        if ( current_user_can( 'create_sites' ) )
    380380                $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' ) )
    382382                $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>';
    383383
    384384        $c_users = get_user_count();
  • wp-admin/includes/file.php

     
    200200/**
    201201 * Make sure that the file that was requested to edit, is allowed to be edited
    202202 *
    203  * Function will die if you are not allowed to edit the file
     203 * Function will die if Sorry, you are not allowed to edit the file
    204204 *
    205205 * @since 1.5.0
    206206 *
  • wp-admin/includes/media.php

     
    31103110        }
    31113111
    31123112        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.' ) );
    31143114        }
    31153115        $ids = array();
    31163116        foreach ( (array) $_REQUEST['media'] as $att_id ) {
  • wp-admin/includes/menu.php

     
    339339         */
    340340        do_action( 'admin_page_access_denied' );
    341341
    342         wp_die( __( 'You do not have sufficient permissions to access this page.' ), 403 );
     342        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    343343}
    344344
    345345$menu = add_menu_classes($menu);
  • wp-admin/includes/meta-boxes.php

     
    902902?>
    903903<div id="delete-action">
    904904<?php
    905 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
     905if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) { ?>
    906906        <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;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>
    907907<?php } ?>
    908908</div>
  • wp-admin/includes/network.php

     
    119119        $hostname = get_clean_basedomain();
    120120        $has_ports = strstr( $hostname, ':' );
    121121        if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) {
    122                 echo '<div class="error"><p><strong>' . __( 'ERROR:') . '</strong> ' . __( 'You cannot install 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>';
    123123                echo '<p>' . sprintf(
    124124                        /* translators: %s: port number */
    125                         __( 'You cannot use port numbers such as %s.' ),
     125                        __( 'Sorry, you are not allowed to use port numbers such as %s.' ),
    126126                        '<code>' . $has_ports . '</code>'
    127127                ) . '</p>';
    128128                echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>';
     
    190190        if ( allow_subdomain_install() && allow_subdirectory_install() ) : ?>
    191191                <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3>
    192192                <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 cannot change this later.' ); ?></strong></p>
     193                        <strong><?php _e( 'Sorry, you are not allowed to change this later.' ); ?></strong></p>
    194194                <p><?php _e( 'You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.' ); ?></p>
    195195                <?php // @todo: Link to an MS readme? ?>
    196196                <table class="form-table">
  • wp-admin/includes/plugin-install.php

     
    380380                                $status = 'update_available';
    381381                                $update_file = $file;
    382382                                $version = $plugin->new_version;
    383                                 if ( current_user_can('update_plugins') )
     383                                if ( current_user_can( 'update_plugins' ) )
    384384                                        $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file);
    385385                                break;
    386386                        }
     
    391391                if ( is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) {
    392392                        $installed_plugin = get_plugins('/' . $api->slug);
    393393                        if ( empty($installed_plugin) ) {
    394                                 if ( current_user_can('install_plugins') )
     394                                if ( current_user_can( 'install_plugins' ) )
    395395                                        $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
    396396                        } else {
    397397                                $key = array_keys( $installed_plugin );
     
    413413                        }
    414414                } else {
    415415                        // "install" & no directory with that slug
    416                         if ( current_user_can('install_plugins') )
     416                        if ( current_user_can( 'install_plugins' ) )
    417417                                $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
    418418                }
    419419        }
  • wp-admin/includes/plugin.php

     
    12771277 * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
    12781278 */
    12791279function 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' ) )
    12811281                $parent = 'users.php';
    12821282        else
    12831283                $parent = 'profile.php';
  • wp-admin/includes/post.php

     
    3030
    3131        if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) {
    3232                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.' ) );
    3434                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.' ) );
    3636        } elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) {
    3737                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.' ) );
    3939                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.' ) );
    4141        }
    4242
    4343        if ( isset( $post_data['content'] ) )
     
    6868                 && ! current_user_can( $ptype->cap->edit_others_posts ) ) {
    6969                if ( $update ) {
    7070                        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.' ) );
    7272                        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.' ) );
    7474                } else {
    7575                        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.' ) );
    7777                        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.' ) );
    7979                }
    8080        }
    8181
     
    203203        $ptype = get_post_type_object($post_data['post_type']);
    204204        if ( !current_user_can( 'edit_post', $post_ID ) ) {
    205205                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.' ));
    207207                else
    208                         wp_die( __('You are not allowed to edit this post.' ));
     208                        wp_die( __('Sorry, you are not allowed to edit this post.' ));
    209209        }
    210210
    211211        if ( post_type_supports( $ptype->name, 'revisions' ) ) {
     
    421421
    422422        if ( !current_user_can( $ptype->cap->edit_posts ) ) {
    423423                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.'));
    425425                else
    426                         wp_die( __('You are not allowed to edit posts.'));
     426                        wp_die( __('Sorry, you are not allowed to edit posts.'));
    427427        }
    428428
    429429        if ( -1 == $post_data['_status'] ) {
     
    714714
    715715        if ( !current_user_can( $ptype->cap->edit_posts ) ) {
    716716                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.' ) );
    718718                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.' ) );
    720720        }
    721721
    722722        $_POST['post_mime_type'] = '';
     
    17171717        $_POST['ID'] = $post_ID;
    17181718
    17191719        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.' ) );
    17211721        }
    17221722
    17231723        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.' ) );
    17251725        }
    17261726
    17271727        $is_autosave = false;
     
    17791779        $post = get_post( $post_id );
    17801780
    17811781        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.' ) );
    17831783        }
    17841784
    17851785        if ( 'auto-draft' == $post->post_status )
  • wp-admin/includes/theme.php

     
    149149function get_theme_update_available( $theme ) {
    150150        static $themes_update = null;
    151151
    152         if ( !current_user_can('update_themes' ) )
     152        if ( !current_user_can( 'update_themes' ) )
    153153                return false;
    154154
    155155        if ( !isset($themes_update) )
     
    170170                $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
    171171
    172172                if ( !is_multisite() ) {
    173                         if ( ! current_user_can('update_themes') ) {
     173                        if ( ! current_user_can( 'update_themes' ) ) {
    174174                                /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
    175175                                $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>',
    176176                                        $theme_name,
  • wp-admin/includes/update.php

     
    182182 * @return string
    183183 */
    184184function core_update_footer( $msg = '' ) {
    185         if ( !current_user_can('update_core') )
     185        if ( !current_user_can( 'update_core' ) )
    186186                return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
    187187
    188188        $cur = get_preferred_from_update_core();
     
    217217 * @return false|void
    218218 */
    219219function update_nag() {
    220         if ( is_multisite() && !current_user_can('update_core') )
     220        if ( is_multisite() && !current_user_can( 'update_core' ) )
    221221                return false;
    222222
    223223        global $pagenow;
     
    230230        if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
    231231                return false;
    232232
    233         if ( current_user_can('update_core') ) {
     233        if ( current_user_can( 'update_core' ) ) {
    234234                $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' ) );
    235235        } else {
    236236                $msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
     
    247247
    248248        $msg = '';
    249249
    250         if ( current_user_can('update_core') ) {
     250        if ( current_user_can( 'update_core' ) ) {
    251251                $cur = get_preferred_from_update_core();
    252252
    253253                if ( isset( $cur->response ) && $cur->response == 'upgrade' )
     
    296296 * @since 2.9.0
    297297 */
    298298function wp_plugin_update_rows() {
    299         if ( !current_user_can('update_plugins' ) )
     299        if ( !current_user_can( 'update_plugins' ) )
    300300                return;
    301301
    302302        $plugins = get_site_transient( 'update_plugins' );
     
    432432 * @since 3.1.0
    433433 */
    434434function wp_theme_update_rows() {
    435         if ( !current_user_can('update_themes' ) )
     435        if ( !current_user_can( 'update_themes' ) )
    436436                return;
    437437
    438438        $themes = get_site_transient( 'update_themes' );
     
    467467        $active = $theme->is_allowed( 'network' ) ? ' active': '';
    468468
    469469        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' ) ) {
    471471                /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
    472472                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>.'),
    473473                        $theme_name,
     
    550550        if ( ! $nag )
    551551                return false;
    552552
    553         if ( current_user_can('update_core') )
     553        if ( current_user_can( 'update_core' ) )
    554554                $msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' );
    555555        else
    556556                $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.');
  • wp-admin/install.php

     
    233233$mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
    234234
    235235if ( !$mysql_compat && !$php_compat )
    236         $compat = sprintf( __( 'You cannot 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 );
     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 );
    237237elseif ( !$php_compat )
    238         $compat = sprintf( __( 'You cannot 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 );
     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 );
    239239elseif ( !$mysql_compat )
    240         $compat = sprintf( __( 'You cannot 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 );
     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 );
    241241
    242242if ( !$mysql_compat || !$php_compat ) {
    243243        display_header();
  • wp-admin/link-add.php

     
    99/** Load WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( ! current_user_can('manage_links') )
    13         wp_die(__('You do not have sufficient permissions to add links to this site.'));
     12if ( ! current_user_can( 'manage_links' ) )
     13        wp_die(__('Sorry, you are not allowed to add links to this site.'));
    1414
    1515$title = __('Add New Link');
    1616$parent_file = 'link-manager.php';
  • wp-admin/link-manager.php

     
    99/** Load WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111if ( ! current_user_can( 'manage_links' ) )
    12         wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
     12        wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
    1313
    1414$wp_list_table = _get_list_table('WP_Links_List_Table');
    1515
     
    6767
    6868include_once( ABSPATH . 'wp-admin/admin-header.php' );
    6969
    70 if ( ! current_user_can('manage_links') )
    71         wp_die(__("You do not have sufficient permissions to edit the links for this site."));
     70if ( ! current_user_can( 'manage_links' ) )
     71        wp_die(__("Sorry, you are not allowed to edit the links for this site."));
    7272
    7373?>
    7474
  • wp-admin/link.php

     
    1414
    1515wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
    1616
    17 if ( ! current_user_can('manage_links') )
     17if ( ! current_user_can( 'manage_links' ) )
    1818        wp_link_manager_disabled_message();
    1919
    2020if ( !empty($_POST['deletebookmarks']) )
  • wp-admin/media-new.php

     
    1212/** Load WordPress Administration Bootstrap */
    1313require_once( dirname( __FILE__ ) . '/admin.php' );
    1414
    15 if (!current_user_can('upload_files'))
    16         wp_die(__('You do not have permission to upload files.'));
     15if (!current_user_can( 'upload_files' ))
     16        wp_die(__('Sorry, you are not allowed to upload files.'));
    1717
    1818wp_enqueue_script('plupload-handlers');
    1919
  • wp-admin/media-upload.php

     
    1616require_once( dirname( __FILE__ ) . '/admin.php' );
    1717
    1818if ( ! current_user_can( 'upload_files' ) ) {
    19         wp_die( __( 'You do not have permission to upload files.' ), 403 );
     19        wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
    2020}
    2121
    2222wp_enqueue_script('plupload-handlers');
     
    4343if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
    4444        wp_die(
    4545                '<h1>' . __( 'Cheatin&#8217; 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>',
    4747                403
    4848        );
    4949}
  • wp-admin/media.php

     
    2020        check_admin_referer('media-form');
    2121
    2222        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.') );
    2424
    2525        $errors = media_upload_form_handler();
    2626
     
    5454        $att_id = (int) $_GET['attachment_id'];
    5555
    5656        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.') );
    5858
    5959        $att = get_post($att_id);
    6060
  • wp-admin/menu.php

     
    211211
    212212unset( $update_data );
    213213
    214 if ( current_user_can('list_users') )
     214if ( current_user_can( 'list_users' ) )
    215215        $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
    216216else
    217217        $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
    218218
    219 if ( current_user_can('list_users') ) {
     219if ( current_user_can( 'list_users' ) ) {
    220220        $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
    221221        $submenu['users.php'][5] = array(__('All Users'), 'list_users', 'users.php');
    222222        if ( current_user_can( 'create_users' ) ) {
  • wp-admin/ms-delete-site.php

     
    1313        wp_die( __( 'Multisite support is not enabled.' ) );
    1414
    1515if ( ! current_user_can( 'delete_site' ) )
    16         wp_die(__( 'You do not have sufficient permissions to delete this site.'));
     16        wp_die(__( 'Sorry, you are not allowed to delete this site.'));
    1717
    1818if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
    1919        if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) {
  • wp-admin/my-sites.php

     
    1212if ( !is_multisite() )
    1313        wp_die( __( 'Multisite support is not enabled.' ) );
    1414
    15 if ( ! current_user_can('read') )
    16         wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
     15if ( ! current_user_can( 'read' ) )
     16        wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
    1717
    1818$action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
    1919
  • wp-admin/nav-menus.php

     
    2222if ( ! current_user_can( 'edit_theme_options' ) ) {
    2323        wp_die(
    2424                '<h1>' . __( 'Cheatin&#8217; 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>',
    2626                403
    2727        );
    2828}
  • wp-admin/network.php

     
    1616require_once( dirname( __FILE__ ) . '/admin.php' );
    1717
    1818if ( ! is_super_admin() ) {
    19         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     19        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    2020}
    2121
    2222if ( is_multisite() ) {
  • wp-admin/network/index.php

     
    1717        wp_die( __( 'Multisite support is not enabled.' ) );
    1818
    1919if ( ! current_user_can( 'manage_network' ) )
    20         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     20        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    2121
    2222$title = __( 'Dashboard' );
    2323$parent_file = 'index.php';
  • wp-admin/network/settings.php

     
    1717        wp_die( __( 'Multisite support is not enabled.' ) );
    1818
    1919if ( ! current_user_can( 'manage_network_options' ) )
    20         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     20        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    2121
    2222$title = __( 'Network Settings' );
    2323$parent_file = 'settings.php';
  • wp-admin/network/site-info.php

     
    1515}
    1616
    1717if ( ! current_user_can( 'manage_sites' ) ) {
    18         wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
     18        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
    1919}
    2020
    2121get_current_screen()->add_help_tab( array(
     
    2626                '<p>' . __( '<strong>Info</strong> &mdash; 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>' .
    2727                '<p>' . __( '<strong>Users</strong> &mdash; 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>' .
    2828                '<p>' . sprintf( __( '<strong>Themes</strong> &mdash; 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&#8217;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> &mdash; 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 cannot modify these values due to the way the setting is stored in the database.' ) . '</p>'
     29                '<p>' . __( '<strong>Settings</strong> &mdash; 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>'
    3030) );
    3131
    3232get_current_screen()->set_help_sidebar(
     
    4747}
    4848
    4949if ( ! can_edit_network( $details->site_id ) ) {
    50         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     50        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    5151}
    5252
    5353$parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME );
  • wp-admin/network/site-new.php

     
    1717        wp_die( __( 'Multisite support is not enabled.' ) );
    1818
    1919if ( ! current_user_can( 'manage_sites' ) )
    20         wp_die( __( 'You do not have sufficient permissions to add sites to this network.' ) );
     20        wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) );
    2121
    2222get_current_screen()->add_help_tab( array(
    2323        'id'      => 'overview',
  • wp-admin/network/site-settings.php

     
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    1616if ( ! current_user_can( 'manage_sites' ) )
    17         wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
     17        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
    1818
    1919get_current_screen()->add_help_tab( array(
    2020        'id'      => 'overview',
     
    2424                '<p>' . __('<strong>Info</strong> &mdash; 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>' .
    2525                '<p>' . __('<strong>Users</strong> &mdash; 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>' .
    2626                '<p>' . sprintf( __('<strong>Themes</strong> &mdash; 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&#8217;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> &mdash; 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 cannot modify these values due to the way the setting is stored in the database.') . '</p>'
     27                '<p>' . __('<strong>Settings</strong> &mdash; 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>'
    2828) );
    2929
    3030get_current_screen()->set_help_sidebar(
     
    4444}
    4545
    4646if ( !can_edit_network( $details->site_id ) )
    47         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     47        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    4848
    4949$is_main_site = is_main_site( $id );
    5050
  • wp-admin/network/site-themes.php

     
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    1616if ( ! current_user_can( 'manage_sites' ) )
    17         wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
     17        wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
    1818
    1919get_current_screen()->add_help_tab( array(
    2020        'id'      => 'overview',
     
    2424                '<p>' . __('<strong>Info</strong> &mdash; 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>' .
    2525                '<p>' . __('<strong>Users</strong> &mdash; 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>' .
    2626                '<p>' . sprintf( __('<strong>Themes</strong> &mdash; 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&#8217;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> &mdash; 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 cannot modify these values due to the way the setting is stored in the database.') . '</p>'
     27                '<p>' . __('<strong>Settings</strong> &mdash; 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>'
    2828) );
    2929
    3030get_current_screen()->set_help_sidebar(
     
    6767}
    6868
    6969if ( !can_edit_network( $details->site_id ) )
    70         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     70        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    7171
    7272$is_main_site = is_main_site( $id );
    7373
  • wp-admin/network/site-users.php

     
    1313if ( ! is_multisite() )
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    16 if ( ! current_user_can('manage_sites') )
    17         wp_die(__('You do not have sufficient permissions to edit this site.'));
     16if ( ! current_user_can( 'manage_sites' ) )
     17        wp_die(__('Sorry, you are not allowed to edit this site.'));
    1818
    1919$wp_list_table = _get_list_table('WP_Users_List_Table');
    2020$wp_list_table->prepare_items();
     
    2727                '<p>' . __('<strong>Info</strong> &mdash; 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>' .
    2828                '<p>' . __('<strong>Users</strong> &mdash; 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>' .
    2929                '<p>' . sprintf( __('<strong>Themes</strong> &mdash; 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&#8217;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> &mdash; 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 cannot modify these values due to the way the setting is stored in the database.') . '</p>'
     30                '<p>' . __('<strong>Settings</strong> &mdash; 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>'
    3131) );
    3232
    3333get_current_screen()->set_help_sidebar(
     
    6060}
    6161
    6262if ( ! can_edit_network( $details->site_id ) )
    63         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     63        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    6464
    6565$is_main_site = is_main_site( $id );
    6666
  • wp-admin/network/sites.php

     
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    1616if ( ! current_user_can( 'manage_sites' ) )
    17         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     17        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    1818
    1919$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
    2020$pagenum = $wp_list_table->get_pagenum();
     
    9191                }
    9292
    9393                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.' ) );
    9595                }
    9696
    9797                $site_details = get_blog_details( $id );
     
    126126
    127127                case 'deleteblog':
    128128                        if ( ! current_user_can( 'delete_sites' ) )
    129                                 wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
     129                                wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
    130130
    131131                        $updated_action = 'not_deleted';
    132132                        if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
     
    144144                                                switch ( $doaction ) {
    145145                                                        case 'delete':
    146146                                                                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.' ) );
    148148
    149149                                                                $updated_action = 'all_delete';
    150150                                                                wpmu_delete_blog( $val, true );
     
    157157                                                        break;
    158158                                                }
    159159                                        } 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.' ) );
    161161                                        }
    162162                                }
    163163                        } else {
     
    237237                        $msg = __( 'Site deleted.' );
    238238                break;
    239239                case 'not_deleted':
    240                         $msg = __( 'You do not have permission to delete that site.' );
     240                        $msg = __( 'Sorry, you are not allowed to delete that site.' );
    241241                break;
    242242                case 'archiveblog':
    243243                        $msg = __( 'Site archived.' );
  • wp-admin/network/themes.php

     
    1313if ( ! is_multisite() )
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    16 if ( !current_user_can('manage_network_themes') )
    17         wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
     16if ( !current_user_can( 'manage_network_themes' ) )
     17        wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
    1818
    1919$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    2020$pagenum = $wp_list_table->get_pagenum();
     
    9090                        exit;
    9191                case 'delete-selected':
    9292                        if ( ! current_user_can( 'delete_themes' ) ) {
    93                                 wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
     93                                wp_die( __('Sorry, you are not allowed to delete themes for this site.') );
    9494                        }
    9595
    9696                        check_admin_referer( 'bulk-themes' );
     
    235235?>
    236236
    237237<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 }
    239239if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    240240        /* translators: %s: search keywords */
    241241        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
     
    271271} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
    272272        echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
    273273} elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) {
    274         echo '<div class="error notice is-dismissible"><p>' . __( 'You cannot delete 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>';
    275275}
    276276
    277277?>
  • wp-admin/network/upgrade.php

     
    3636require_once( ABSPATH . 'wp-admin/admin-header.php' );
    3737
    3838if ( ! current_user_can( 'manage_network' ) )
    39         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     39        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    4040
    4141echo '<div class="wrap">';
    4242echo '<h1>' . __( 'Upgrade Network' ) . '</h1>';
  • wp-admin/network/user-new.php

     
    1313if ( ! is_multisite() )
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    16 if ( ! current_user_can('create_users') )
    17         wp_die(__('You do not have sufficient permissions to add users to this network.'));
     16if ( ! current_user_can( 'create_users' ) )
     17        wp_die(__('Sorry, you are not allowed to add users to this network.'));
    1818
    1919get_current_screen()->add_help_tab( array(
    2020        'id'      => 'overview',
     
    3434        check_admin_referer( 'add-user', '_wpnonce_add-user' );
    3535
    3636        if ( ! current_user_can( 'manage_network_users' ) )
    37                 wp_die( __( 'You do not have permission to access this page.' ), 403 );
     37                wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    3838
    3939        if ( ! is_array( $_POST['user'] ) )
    4040                wp_die( __( 'Cannot create an empty user.' ) );
  • wp-admin/network/users.php

     
    1414        wp_die( __( 'Multisite support is not enabled.' ) );
    1515
    1616if ( ! current_user_can( 'manage_network_users' ) )
    17         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     17        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    1818
    1919if ( isset( $_GET['action'] ) ) {
    2020        /** This action is documented in wp-admin/network/edit.php */
     
    2323        switch ( $_GET['action'] ) {
    2424                case 'deleteuser':
    2525                        if ( ! current_user_can( 'manage_network_users' ) )
    26                                 wp_die( __( 'You do not have permission to access this page.' ), 403 );
     26                                wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    2727
    2828                        check_admin_referer( 'deleteuser' );
    2929
     
    4444
    4545                case 'allusers':
    4646                        if ( !current_user_can( 'manage_network_users' ) )
    47                                 wp_die( __( 'You do not have permission to access this page.' ), 403 );
     47                                wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    4848
    4949                        if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
    5050                                check_admin_referer( 'bulk-users-network' );
     
    5757                                                switch ( $doaction ) {
    5858                                                        case 'delete':
    5959                                                                if ( ! current_user_can( 'delete_users' ) )
    60                                                                         wp_die( __( 'You do not have permission to access this page.' ), 403 );
     60                                                                        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    6161                                                                $title = __( 'Users' );
    6262                                                                $parent_file = 'users.php';
    6363                                                                require_once( ABSPATH . 'wp-admin/admin-header.php' );
     
    106106                case 'dodelete':
    107107                        check_admin_referer( 'ms-users-delete' );
    108108                        if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) )
    109                                 wp_die( __( 'You do not have permission to access this page.' ), 403 );
     109                                wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    110110
    111111                        if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) {
    112112                                foreach ( $_POST['blog'] as $id => $users ) {
  • wp-admin/options-discussion.php

     
    99require_once( dirname( __FILE__ ) . '/admin.php' );
    1010
    1111if ( ! current_user_can( 'manage_options' ) )
    12         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     12        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1313
    1414$title = __('Discussion Settings');
    1515$parent_file = 'options-general.php';
  • wp-admin/options-general.php

     
    1313require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
    1414
    1515if ( ! current_user_can( 'manage_options' ) )
    16         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     16        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1717
    1818$title = __('General Settings');
    1919$parent_file = 'options-general.php';
  • wp-admin/options-media.php

     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) )
    13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     13        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414
    1515$title = __('Media Settings');
    1616$parent_file = 'options-general.php';
  • wp-admin/options-permalink.php

     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) )
    13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     13        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414
    1515$title = __('Permalink Settings');
    1616$parent_file = 'options-general.php';
  • wp-admin/options-reading.php

     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) )
    13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     13        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414
    1515$title = __( 'Reading Settings' );
    1616$parent_file = 'options-general.php';
  • wp-admin/options-writing.php

     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212if ( ! current_user_can( 'manage_options' ) )
    13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     13        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414
    1515$title = __('Writing Settings');
    1616$parent_file = 'options-general.php';
  • wp-admin/options.php

     
    4747if ( ! current_user_can( $capability ) ) {
    4848        wp_die(
    4949                '<h1>' . __( 'Cheatin&#8217; 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>',
    5151                403
    5252        );
    5353}
     
    7676if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
    7777        wp_die(
    7878                '<h1>' . __( 'Cheatin&#8217; 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>',
    8080                403
    8181        );
    8282}
     
    160160
    161161        if ( 'options' == $option_page ) {
    162162                if ( is_multisite() && ! is_super_admin() )
    163                         wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
     163                        wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
    164164                $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
    165165        } else {
    166166                $options = $whitelist_options[ $option_page ];
  • wp-admin/plugin-editor.php

     
    1414        exit();
    1515}
    1616
    17 if ( !current_user_can('edit_plugins') )
    18         wp_die( __('You do not have sufficient permissions to edit plugins for this site.') );
     17if ( !current_user_can( 'edit_plugins' ) )
     18        wp_die( __('Sorry, you are not allowed to edit plugins for this site.') );
    1919
    20 $title = __("Edit Plugins");
     20$title = __('Edit Plugins');
    2121$parent_file = 'plugins.php';
    2222
    2323wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
  • wp-admin/plugin-install.php

     
    1414 */
    1515require_once( dirname( __FILE__ ) . '/admin.php' );
    1616
    17 if ( ! current_user_can('install_plugins') )
    18         wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
     17if ( ! current_user_can( 'install_plugins' ) )
     18        wp_die(__('Sorry, you are not allowed to install plugins on this site.'));
    1919
    2020if ( is_multisite() && ! is_network_admin() ) {
    2121        wp_redirect( network_admin_url( 'plugin-install.php' ) );
  • wp-admin/plugins.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( ! current_user_can('activate_plugins') )
    13         wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
     12if ( ! current_user_can( 'activate_plugins' ) )
     13        wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) );
    1414
    1515$wp_list_table = _get_list_table('WP_Plugins_List_Table');
    1616$pagenum = $wp_list_table->get_pagenum();
     
    2929
    3030        switch ( $action ) {
    3131                case 'activate':
    32                         if ( ! current_user_can('activate_plugins') )
    33                                 wp_die(__('You do not have sufficient permissions to 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.'));
    3434
    3535                        if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
    3636                                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
     
    6868                        exit;
    6969
    7070                case 'activate-selected':
    71                         if ( ! current_user_can('activate_plugins') )
    72                                 wp_die(__('You do not have sufficient permissions to 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.'));
    7373
    7474                        check_admin_referer('bulk-plugins');
    7575
     
    146146                        exit;
    147147
    148148                case 'error_scrape':
    149                         if ( ! current_user_can('activate_plugins') )
    150                                 wp_die(__('You do not have sufficient permissions to 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.'));
    151151
    152152                        check_admin_referer('plugin-activation-error_' . $plugin);
    153153
     
    167167                        exit;
    168168
    169169                case 'deactivate':
    170                         if ( ! current_user_can('activate_plugins') )
    171                                 wp_die(__('You do not have sufficient permissions to 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.'));
    172172
    173173                        check_admin_referer('deactivate-plugin_' . $plugin);
    174174
     
    192192                        exit;
    193193
    194194                case 'deactivate-selected':
    195                         if ( ! current_user_can('activate_plugins') )
    196                                 wp_die(__('You do not have sufficient permissions to 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.'));
    197197
    198198                        check_admin_referer('bulk-plugins');
    199199
     
    227227                        exit;
    228228
    229229                case 'delete-selected':
    230                         if ( ! current_user_can('delete_plugins') ) {
    231                                 wp_die(__('You do not have sufficient permissions to 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.'));
    232232                        }
    233233
    234234                        check_admin_referer('bulk-plugins');
     
    423423<?php if ( isset($_GET['error']) ) :
    424424
    425425        if ( isset( $_GET['main'] ) )
    426                 $errmsg = __( 'You cannot delete 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.' );
    427427        elseif ( isset($_GET['charsout']) )
    428428                $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
    429429        else
     
    477477
    478478<div class="wrap">
    479479<h1><?php echo esc_html( $title );
    480 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
     480if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) { ?>
    481481 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
    482482<?php
    483483}
  • wp-admin/post-new.php

     
    5757if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
    5858        wp_die(
    5959                '<h1>' . __( 'Cheatin&#8217; 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>',
    6161                403
    6262        );
    6363}
  • wp-admin/post.php

     
    110110                wp_die( __( 'Unknown post type.' ) );
    111111
    112112        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.' ) );
    114114        }
    115115
    116116        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.' ) );
    118118
    119119        if ( 'trash' == $post->post_status )
    120120                wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
     
    211211                wp_die( __( 'Unknown post type.' ) );
    212212
    213213        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.' ) );
    215215
    216216        if ( $user_id = wp_check_post_lock( $post_id ) ) {
    217217                $user = get_userdata( $user_id );
    218                 wp_die( sprintf( __( 'You cannot move 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 ) );
    219219        }
    220220
    221221        if ( ! wp_trash_post( $post_id ) )
     
    234234                wp_die( __( 'Unknown post type.' ) );
    235235
    236236        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.' ) );
    238238
    239239        if ( ! wp_untrash_post( $post_id ) )
    240240                wp_die( __( 'Error in restoring from Trash.' ) );
     
    252252                wp_die( __( 'Unknown post type.' ) );
    253253
    254254        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.' ) );
    256256
    257257        if ( $post->post_type == 'attachment' ) {
    258258                $force = ( ! MEDIA_TRASH );
  • wp-admin/press-this.php

     
    1414if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    1515        wp_die(
    1616                '<h1>' . __( 'Cheatin&#8217; 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>',
    1818                403
    1919        );
    2020}
  • wp-admin/term.php

     
    3535) {
    3636        wp_die(
    3737                '<h1>' . __( 'Cheatin&#8217; 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>',
    3939                403
    4040        );
    4141}
  • wp-admin/theme-editor.php

     
    1414        exit();
    1515}
    1616
    17 if ( !current_user_can('edit_themes') )
    18         wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site.').'</p>');
     17if ( !current_user_can( 'edit_themes' ) )
     18        wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>');
    1919
    20 $title = __("Edit Themes");
     20$title = __('Edit Themes');
    2121$parent_file = 'themes.php';
    2222
    2323get_current_screen()->add_help_tab( array(
  • wp-admin/theme-install.php

     
    1313wp_reset_vars( array( 'tab' ) );
    1414
    1515if ( ! current_user_can('install_themes') )
    16         wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
     16        wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
    1717
    1818if ( is_multisite() && ! is_network_admin() ) {
    1919        wp_redirect( network_admin_url( 'theme-install.php' ) );
  • wp-admin/themes.php

     
    1212if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    1313        wp_die(
    1414                '<h1>' . __( 'Cheatin&#8217; 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>',
    1616                403
    1717        );
    1818}
     
    4040                if ( ! current_user_can( 'delete_themes' ) ) {
    4141                        wp_die(
    4242                                '<h1>' . __( 'Cheatin&#8217; 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>',
    4444                                403
    4545                        );
    4646                }
     
    169169        elseif ( isset($_GET['deleted']) ) : ?>
    170170<div id="message3" class="updated notice is-dismissible"><p><?php _e('Theme deleted.') ?></p></div>
    171171<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
    172         <div id="message4" class="error"><p><?php _e( 'You cannot delete 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>
    173173<?php
    174174endif;
    175175
     
    290290
    291291<?php
    292292// List broken themes, if any.
    293 if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
     293if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
    294294?>
    295295
    296296<div class="broken-themes">
  • wp-admin/tools.php

     
    3535<div class="wrap">
    3636<h1><?php echo esc_html( $title ); ?></h1>
    3737
    38 <?php if ( current_user_can('edit_posts') ) : ?>
     38<?php if ( current_user_can( 'edit_posts' ) ) : ?>
    3939<div class="card pressthis">
    4040        <h2><?php _e('Press This') ?></h2>
    4141        <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

     
    2020}
    2121
    2222if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
    23         wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     23        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    2424
    2525/**
    2626 *
     
    6868                                $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' );
    6969
    7070                        if ( !$mysql_compat && !$php_compat )
    71                                 $message = sprintf( __('You cannot 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 );
     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 );
    7272                        elseif ( !$php_compat )
    73                                 $message = sprintf( __('You cannot 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 );
     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 );
    7474                        elseif ( !$mysql_compat )
    75                                 $message = sprintf( __('You cannot 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 );
     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 );
    7676                        else
    7777                                $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);
    7878                        if ( !$mysql_compat || !$php_compat )
     
    623623} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
    624624
    625625        if ( ! current_user_can( 'update_core' ) )
    626                 wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     626                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    627627
    628628        check_admin_referer('upgrade-core');
    629629
     
    647647} elseif ( 'do-plugin-upgrade' == $action ) {
    648648
    649649        if ( ! current_user_can( 'update_plugins' ) )
    650                 wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     650                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    651651
    652652        check_admin_referer('upgrade-core');
    653653
     
    675675} elseif ( 'do-theme-upgrade' == $action ) {
    676676
    677677        if ( ! current_user_can( 'update_themes' ) )
    678                 wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     678                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    679679
    680680        check_admin_referer('upgrade-core');
    681681
     
    705705} elseif ( 'do-translation-upgrade' == $action ) {
    706706
    707707        if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
    708                 wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     708                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    709709
    710710        check_admin_referer( 'upgrade-translations' );
    711711
  • wp-admin/update.php

     
    2121
    2222        if ( 'update-selected' == $action ) {
    2323                if ( ! current_user_can( 'update_plugins' ) )
    24                         wp_die( __( 'You do not have sufficient permissions to update plugins for this site.' ) );
     24                        wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
    2525
    2626                check_admin_referer( 'bulk-update-plugins' );
    2727
     
    4646                iframe_footer();
    4747
    4848        } elseif ( 'upgrade-plugin' == $action ) {
    49                 if ( ! current_user_can('update_plugins') )
    50                         wp_die(__('You do not have sufficient permissions to 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.'));
    5151
    5252                check_admin_referer('upgrade-plugin_' . $plugin);
    5353
     
    6767                include(ABSPATH . 'wp-admin/admin-footer.php');
    6868
    6969        } elseif ('activate-plugin' == $action ) {
    70                 if ( ! current_user_can('update_plugins') )
    71                         wp_die(__('You do not have sufficient permissions to 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.'));
    7272
    7373                check_admin_referer('activate-plugin_' . $plugin);
    7474                if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
     
    9292                iframe_footer();
    9393        } elseif ( 'install-plugin' == $action ) {
    9494
    95                 if ( ! current_user_can('install_plugins') )
    96                         wp_die( __( 'You do not have sufficient permissions to 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.' ) );
    9797
    9898                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
    9999
     
    141141        } elseif ( 'upload-plugin' == $action ) {
    142142
    143143                if ( ! current_user_can( 'upload_plugins' ) ) {
    144                         wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
     144                        wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
    145145                }
    146146
    147147                check_admin_referer('plugin-upload');
     
    168168
    169169        } elseif ( 'upgrade-theme' == $action ) {
    170170
    171                 if ( ! current_user_can('update_themes') )
    172                         wp_die(__('You do not have sufficient permissions to 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.'));
    173173
    174174                check_admin_referer('upgrade-theme_' . $theme);
    175175
     
    190190                include(ABSPATH . 'wp-admin/admin-footer.php');
    191191        } elseif ( 'update-selected-themes' == $action ) {
    192192                if ( ! current_user_can( 'update_themes' ) )
    193                         wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
     193                        wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
    194194
    195195                check_admin_referer( 'bulk-update-themes' );
    196196
     
    215215                iframe_footer();
    216216        } elseif ( 'install-theme' == $action ) {
    217217
    218                 if ( ! current_user_can('install_themes') )
    219                         wp_die( __( 'You do not have sufficient permissions to 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.' ) );
    220220
    221221                include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
    222222
     
    246246        } elseif ( 'upload-theme' == $action ) {
    247247
    248248                if ( ! current_user_can( 'upload_themes' ) ) {
    249                         wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
     249                        wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
    250250                }
    251251
    252252                check_admin_referer('theme-upload');
  • wp-admin/upgrade.php

     
    7878
    7979<?php elseif ( !$php_compat || !$mysql_compat ) :
    8080        if ( !$mysql_compat && !$php_compat )
    81                 printf( __('You cannot 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 );
     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 );
    8282        elseif ( !$php_compat )
    83                 printf( __('You cannot 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 );
     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 );
    8484        elseif ( !$mysql_compat )
    85                 printf( __('You cannot 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 );
     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 );
    8686?>
    8787<?php else :
    8888switch ( $step ) :
  • wp-admin/upload.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( !current_user_can('upload_files') )
    13         wp_die( __( 'You do not have permission to upload files.' ) );
     12if ( !current_user_can( 'upload_files' ) )
     13        wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
    1414
    1515$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
    1616$modes = array( 'grid', 'list' );
     
    132132                                break;
    133133                        foreach ( (array) $post_ids as $post_id ) {
    134134                                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.' ) );
    136136
    137137                                if ( !wp_trash_post( $post_id ) )
    138138                                        wp_die( __( 'Error in moving to Trash.' ) );
     
    144144                                break;
    145145                        foreach ( (array) $post_ids as $post_id ) {
    146146                                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.' ) );
    148148
    149149                                if ( !wp_untrash_post( $post_id ) )
    150150                                        wp_die( __( 'Error in restoring from Trash.' ) );
     
    156156                                break;
    157157                        foreach ( (array) $post_ids as $post_id_del ) {
    158158                                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.' ) );
    160160
    161161                                if ( !wp_delete_attachment( $post_id_del ) )
    162162                                        wp_die( __( 'Error in deleting.' ) );
  • wp-admin/user-edit.php

     
    2626wp_enqueue_script('user-profile');
    2727
    2828$title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User');
    29 if ( current_user_can('edit_users') && !IS_PROFILE_PAGE )
     29if ( current_user_can( 'edit_users' ) && !IS_PROFILE_PAGE )
    3030        $submenu_file = 'users.php';
    3131else
    3232        $submenu_file = 'profile.php';
    3333
    34 if ( current_user_can('edit_users') && !is_user_admin() )
     34if ( current_user_can( 'edit_users' ) && !is_user_admin() )
    3535        $parent_file = 'users.php';
    3636else
    3737        $parent_file = 'profile.php';
     
    7777        && $user_id != $current_user->ID
    7878        && ! apply_filters( 'enable_edit_any_user_configuration', true )
    7979) {
    80         wp_die( __( 'You do not have permission to edit this user.' ) );
     80        wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
    8181}
    8282
    8383// Execute confirmed email change. See send_confirmation_on_profile_email().
     
    110110check_admin_referer('update-user_' . $user_id);
    111111
    112112if ( !current_user_can('edit_user', $user_id) )
    113         wp_die(__('You do not have permission to edit this user.'));
     113        wp_die(__('Sorry, you are not allowed to edit this user.'));
    114114
    115115if ( IS_PROFILE_PAGE ) {
    116116        /**
     
    163163$profileuser = get_user_to_edit($user_id);
    164164
    165165if ( !current_user_can('edit_user', $user_id) )
    166         wp_die(__('You do not have permission to edit this user.'));
     166        wp_die(__('Sorry, you are not allowed to edit this user.'));
    167167
    168168$sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
    169169
  • wp-admin/user-new.php

     
    1313        if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
    1414                wp_die(
    1515                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    16                         '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
     16                        '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
    1717                        403
    1818                );
    1919        }
     
    2020} elseif ( ! current_user_can( 'create_users' ) ) {
    2121        wp_die(
    2222                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    23                 '<p>' . __( 'You are not allowed to create users.' ) . '</p>',
     23                '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    2424                403
    2525        );
    2626}
     
    5353        if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
    5454                wp_die(
    5555                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    56                         '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
     56                        '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
    5757                        403
    5858                );
    5959        }
     
    107107        if ( ! current_user_can( 'create_users' ) ) {
    108108                wp_die(
    109109                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    110                         '<p>' . __( 'You are not allowed to create users.' ) . '</p>',
     110                        '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    111111                        403
    112112                );
    113113        }
     
    166166$parent_file = 'users.php';
    167167
    168168$do_both = false;
    169 if ( is_multisite() && current_user_can('promote_users') && current_user_can('create_users') )
     169if ( is_multisite() && current_user_can( 'promote_users' ) && current_user_can( 'create_users' ) )
    170170        $do_both = true;
    171171
    172172$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>';
     
    484484<?php submit_button( __( 'Add New User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
    485485
    486486</form>
    487 <?php } // current_user_can('create_users') ?>
     487<?php } // current_user_can( 'create_users' ) ?>
    488488</div>
    489489<?php
    490490include( ABSPATH . 'wp-admin/admin-footer.php' );
  • wp-admin/users.php

     
    1313if ( ! current_user_can( 'list_users' ) ) {
    1414        wp_die(
    1515                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    16                 '<p>' . __( 'You are not allowed to browse users.' ) . '</p>',
     16                '<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
    1717                403
    1818        );
    1919}
  • wp-admin/widgets.php

     
    1515if ( ! current_user_can( 'edit_theme_options' ) ) {
    1616        wp_die(
    1717                '<h1>' . __( 'Cheatin&#8217; 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>',
    1919                403
    2020        );
    2121}
  • wp-includes/admin-bar.php

     
    688688 * @param WP_Admin_Bar $wp_admin_bar
    689689 */
    690690function wp_admin_bar_comments_menu( $wp_admin_bar ) {
    691         if ( !current_user_can('edit_posts') )
     691        if ( !current_user_can( 'edit_posts' ) )
    692692                return;
    693693
    694694        $awaiting_mod = wp_count_comments();
  • wp-includes/class-wp-customize-manager.php

     
    387387                show_admin_bar( false );
    388388
    389389                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.' ) );
    391391                }
    392392
    393393                $this->original_stylesheet = get_stylesheet();
     
    401401                        // If the requested theme is not the active theme and the user doesn't have the
    402402                        // switch_themes cap, bail.
    403403                        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.' ) );
    405405                        }
    406406
    407407                        // If the theme has errors while loading, bail.
  • wp-includes/class-wp-xmlrpc-server.php

     
    12591259                if ( 'private' === $post_data['post_status'] || ! empty( $post_data['post_password'] ) ) {
    12601260                        // Error if the client tried to stick the post, otherwise, silently unstick.
    12611261                        if ( ! empty( $post_data['sticky'] ) ) {
    1262                                 return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) );
     1262                                return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to stick a private post.' ) );
    12631263                        }
    12641264
    12651265                        if ( $update ) {
     
    12671267                        }
    12681268                } elseif ( isset( $post_data['sticky'] ) )  {
    12691269                        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.' ) );
    12711271                        }
    12721272
    12731273                        $sticky = wp_validate_boolean( $post_data['sticky'] );
     
    13071307                        if ( ! get_post( $post_data['ID'] ) )
    13081308                                return new IXR_Error( 401, __( 'Invalid post ID.' ) );
    13091309                        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.' ) );
    13111311                        if ( $post_data['post_type'] != get_post_type( $post_data['ID'] ) )
    13121312                                return new IXR_Error( 401, __( 'The post type may not be changed.' ) );
    13131313                } else {
    13141314                        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.' ) );
    13161316                }
    13171317
    13181318                switch ( $post_data['post_status'] ) {
     
    13211321                                break;
    13221322                        case 'private':
    13231323                                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' ) );
    13251325                                break;
    13261326                        case 'publish':
    13271327                        case 'future':
    13281328                                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' ) );
    13301330                                break;
    13311331                        default:
    13321332                                if ( ! get_post_status_object( $post_data['post_status'] ) )
     
    13351335                }
    13361336
    13371337                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' ) );
    13391339
    13401340                $post_data['post_author'] = absint( $post_data['post_author'] );
    13411341                if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) {
    13421342                        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.' ) );
    13441344
    13451345                        $author = get_userdata( $post_data['post_author'] );
    13461346
     
    14151415                                                return new IXR_Error( 401, __( 'Sorry, one of the given taxonomies is not supported by the post type.' ) );
    14161416
    14171417                                        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.' ) );
    14191419
    14201420                                        $term_ids = $post_data['terms'][$taxonomy];
    14211421                                        $terms[ $taxonomy ] = array();
     
    14391439                                                return new IXR_Error( 401, __( 'Sorry, one of the given taxonomies is not supported by the post type.' ) );
    14401440
    14411441                                        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.' ) );
    14431443
    14441444                                        /*
    14451445                                         * For hierarchical taxonomies, we can't assign a term when multiple terms
     
    14681468                                                if ( ! $term ) {
    14691469                                                        // Term doesn't exist, so check that the user is allowed to create new terms.
    14701470                                                        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.' ) );
    14721472
    14731473                                                        // Create the new term.
    14741474                                                        $term_info = wp_insert_term( $term_name, $taxonomy );
     
    16341634                }
    16351635
    16361636                if ( ! current_user_can( 'delete_post', $post_id ) ) {
    1637                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
     1637                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
    16381638                }
    16391639
    16401640                $result = wp_delete_post( $post_id );
     
    17311731                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    17321732
    17331733                if ( ! current_user_can( 'edit_post', $post_id ) )
    1734                         return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     1734                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) );
    17351735
    17361736                return $this->_prepare_post( $post, $fields );
    17371737        }
     
    17921792                }
    17931793
    17941794                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.' ));
    17961796
    17971797                $query['post_type'] = $post_type->name;
    17981798
     
    18751875                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    18761876
    18771877                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.' ) );
    18791879
    18801880                $taxonomy = (array) $taxonomy;
    18811881
     
    19621962                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    19631963
    19641964                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.' ) );
    19661966
    19671967                $taxonomy = (array) $taxonomy;
    19681968
     
    20582058                $taxonomy = get_taxonomy( $taxonomy );
    20592059
    20602060                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.' ) );
    20622062
    20632063                $term = get_term( $term_id, $taxonomy->name );
    20642064
     
    21292129                $taxonomy = get_taxonomy( $taxonomy );
    21302130
    21312131                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.' ) );
    21332133
    21342134                $term = get_term( $term_id , $taxonomy->name, ARRAY_A );
    21352135
     
    21872187                $taxonomy = get_taxonomy( $taxonomy );
    21882188
    21892189                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.' ) );
    21912191
    21922192                $query = array();
    21932193
     
    22822282                $taxonomy = get_taxonomy( $taxonomy );
    22832283
    22842284                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.' ) );
    22862286
    22872287                return $this->_prepare_taxonomy( $taxonomy, $fields );
    22882288        }
     
    24122412                do_action( 'xmlrpc_call', 'wp.getUser' );
    24132413
    24142414                if ( ! current_user_can( 'edit_user', $user_id ) )
    2415                         return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
     2415                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit users.' ) );
    24162416
    24172417                $user_data = get_userdata( $user_id );
    24182418
     
    24702470                do_action( 'xmlrpc_call', 'wp.getUsers' );
    24712471
    24722472                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.' ) );
    24742474
    24752475                $query = array( 'fields' => 'all_with_meta' );
    24762476
     
    25432543                do_action( 'xmlrpc_call', 'wp.getProfile' );
    25442544
    25452545                if ( ! current_user_can( 'edit_user', $user->ID ) )
    2546                         return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
     2546                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit your profile.' ) );
    25472547
    25482548                $user_data = get_userdata( $user->ID );
    25492549
     
    25892589                do_action( 'xmlrpc_call', 'wp.editProfile' );
    25902590
    25912591                if ( ! current_user_can( 'edit_user', $user->ID ) )
    2592                         return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
     2592                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit your profile.' ) );
    25932593
    25942594                // holds data of the user
    25952595                $user_data = array();
     
    26592659                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    26602660
    26612661                if ( !current_user_can( 'edit_page', $page_id ) )
    2662                         return new IXR_Error( 401, __( 'Sorry, you cannot edit this page.' ) );
     2662                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this page.' ) );
    26632663
    26642664                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    26652665                do_action( 'xmlrpc_call', 'wp.getPage' );
     
    27002700                        return $this->error;
    27012701
    27022702                if ( !current_user_can( 'edit_pages' ) )
    2703                         return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
     2703                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit pages.' ) );
    27042704
    27052705                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    27062706                do_action( 'xmlrpc_call', 'wp.getPages' );
     
    27942794
    27952795                // Make sure the user can delete pages.
    27962796                if ( !current_user_can('delete_page', $page_id) )
    2797                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this page.' ) );
     2797                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this page.' ) );
    27982798
    27992799                // Attempt to delete the page.
    28002800                $result = wp_delete_post($page_id);
     
    28562856
    28572857                // Make sure the user is allowed to edit pages.
    28582858                if ( !current_user_can('edit_page', $page_id) )
    2859                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this page.' ) );
     2859                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) );
    28602860
    28612861                // Mark this as content for a page.
    28622862                $content['post_type'] = 'page';
     
    29022902                        return $this->error;
    29032903
    29042904                if ( !current_user_can( 'edit_pages' ) )
    2905                         return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
     2905                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit pages.' ) );
    29062906
    29072907                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    29082908                do_action( 'xmlrpc_call', 'wp.getPageList' );
     
    29572957                if ( !$user = $this->login($username, $password) )
    29582958                        return $this->error;
    29592959
    2960                 if ( !current_user_can('edit_posts') )
    2961                         return new IXR_Error( 401, __( 'Sorry, you cannot edit 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.' ) );
    29622962
    29632963                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    29642964                do_action( 'xmlrpc_call', 'wp.getAuthors' );
     
    30523052                do_action( 'xmlrpc_call', 'wp.newCategory' );
    30533053
    30543054                // 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 right to 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.'));
    30573057
    30583058                // If no slug was provided make it empty so that
    30593059                // WordPress will generate one.
     
    31273127                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    31283128                do_action( 'xmlrpc_call', 'wp.deleteCategory' );
    31293129
    3130                 if ( !current_user_can('manage_categories') )
    3131                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to 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.' ) );
    31323132
    31333133                $status = wp_delete_term( $category_id, 'category' );
    31343134
     
    32263226                }
    32273227
    32283228                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.' ) );
    32303230                }
    32313231
    32323232                return $this->_prepare_comment( $comment );
     
    33583358                }
    33593359
    33603360                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.' ) );
    33623362                }
    33633363
    33643364                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    34253425                }
    34263426
    34273427                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.' ) );
    34293429                }
    34303430
    34313431                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    38683868                        return $this->error;
    38693869
    38703870                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.' ) );
    38723872
    38733873                $option_names = array();
    38743874                foreach ( $options as $o_name => $o_value ) {
     
    39203920                        return $this->error;
    39213921
    39223922                if ( !current_user_can( 'upload_files' ) )
    3923                         return new IXR_Error( 403, __( 'You do not have permission to upload files.' ) );
     3923                        return new IXR_Error( 403, __( 'Sorry, you are not allowed to upload files.' ) );
    39243924
    39253925                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    39263926                do_action( 'xmlrpc_call', 'wp.getMediaItem' );
     
    39683968                        return $this->error;
    39693969
    39703970                if ( !current_user_can( 'upload_files' ) )
    3971                         return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
     3971                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
    39723972
    39733973                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    39743974                do_action( 'xmlrpc_call', 'wp.getMediaLibrary' );
     
    41004100                $post_type = get_post_type_object( $post_type_name );
    41014101
    41024102                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.' ) );
    41044104
    41054105                return $this->_prepare_post_type( $post_type, $fields );
    41064106        }
     
    42164216                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    42174217
    42184218                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.' ) );
    42204220
    42214221                // Check if revisions are enabled.
    42224222                if ( ! wp_revisions_enabled( $post ) )
     
    42864286                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    42874287
    42884288                if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
    4289                         return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     4289                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) );
    42904290
    42914291                // Check if revisions are disabled.
    42924292                if ( ! wp_revisions_enabled( $post ) )
     
    43324332                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    43334333                do_action( 'xmlrpc_call', 'blogger.getUsersBlogs' );
    43344334
    4335                 $is_admin = current_user_can('manage_options');
     4335                $is_admin = current_user_can( 'manage_options' );
    43364336
    43374337                $struct = array(
    43384338                        'isAdmin'  => $is_admin,
     
    44554455                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    44564456
    44574457                if ( !current_user_can( 'edit_post', $post_ID ) )
    4458                         return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     4458                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) );
    44594459
    44604460                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    44614461                do_action( 'xmlrpc_call', 'blogger.getPost' );
     
    45084508                        return $this->error;
    45094509
    45104510                if ( ! current_user_can( 'edit_posts' ) )
    4511                         return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
     4511                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts on this site.' ) );
    45124512
    45134513                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    45144514                do_action( 'xmlrpc_call', 'blogger.getRecentPosts' );
     
    46024602
    46034603                $cap = ($publish) ? 'publish_posts' : 'edit_posts';
    46044604                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.'));
    46064606
    46074607                $post_status = ($publish) ? 'publish' : 'draft';
    46084608
     
    46824682                $this->escape($actual_post);
    46834683
    46844684                if ( ! current_user_can( 'edit_post', $post_ID ) ) {
    4685                         return new IXR_Error(401, __('Sorry, you do not have the right to edit this post.'));
     4685                        return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.'));
    46864686                }
    46874687                if ( 'publish' == $actual_post['post_status'] && ! current_user_can( 'publish_posts' ) ) {
    4688                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
     4688                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
    46894689                }
    46904690
    46914691                $postdata = array();
     
    47524752                }
    47534753
    47544754                if ( ! current_user_can( 'delete_post', $post_ID ) ) {
    4755                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
     4755                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
    47564756                }
    47574757
    47584758                $result = wp_delete_post( $post_ID );
     
    48394839                                        $cap  = 'publish_pages';
    48404840                                else
    48414841                                        $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.' );
    48434843                                $post_type = 'page';
    48444844                                if ( !empty( $content_struct['wp_page_template'] ) )
    48454845                                        $page_template = $content_struct['wp_page_template'];
     
    48504850                                        $cap  = 'publish_posts';
    48514851                                else
    48524852                                        $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.' );
    48544854                                $post_type = 'post';
    48554855                        } else {
    48564856                                // No other post_type values are allowed here
     
    48634863                                $cap  = 'publish_posts';
    48644864                        else
    48654865                                $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.' );
    48674867                        $post_type = 'post';
    48684868                }
    48694869
    48704870                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.' ) );
    48724872                if ( !current_user_can( $cap ) )
    48734873                        return new IXR_Error( 401, $error_message );
    48744874
     
    49054905                        switch ( $post_type ) {
    49064906                                case "post":
    49074907                                        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.' ) );
    49094909                                        break;
    49104910                                case "page":
    49114911                                        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.' ) );
    49134913                                        break;
    49144914                                default:
    49154915                                        return new IXR_Error( 401, __( 'Invalid post type' ) );
     
    51865186                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    51875187
    51885188                if ( ! current_user_can( 'edit_post', $post_ID ) )
    5189                         return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this post.' ) );
     5189                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    51905190
    51915191                // Use wp.editPost to edit post types other than post and page.
    51925192                if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) )
     
    52455245                                switch ( $post_type ) {
    52465246                                        case 'post':
    52475247                                                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.' ) );
    52495249                                                }
    52505250                                                break;
    52515251                                        case 'page':
    52525252                                                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.' ) );
    52545254                                                }
    52555255                                                break;
    52565256                                        default:
     
    53575357
    53585358                if ( 'publish' == $post_status || 'private' == $post_status ) {
    53595359                        if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
    5360                                 return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
     5360                                return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this page.' ) );
    53615361                        } elseif ( ! current_user_can( 'publish_posts' ) ) {
    5362                                 return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
     5362                                return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
    53635363                        }
    53645364                }
    53655365
     
    54835483                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    54845484
    54855485                if ( !current_user_can( 'edit_post', $post_ID ) )
    5486                         return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     5486                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) );
    54875487
    54885488                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    54895489                do_action( 'xmlrpc_call', 'metaWeblog.getPost' );
     
    56135613                        return $this->error;
    56145614
    56155615                if ( ! current_user_can( 'edit_posts' ) )
    5616                         return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
     5616                        return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit posts on this site.' ) );
    56175617
    56185618                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    56195619                do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts' );
     
    57895789                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    57905790                do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' );
    57915791
    5792                 if ( !current_user_can('upload_files') ) {
    5793                         $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
     5792                if ( !current_user_can( 'upload_files' ) ) {
     5793                        $this->error = new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
    57945794                        return $this->error;
    57955795                }
    57965796
     
    58245824                        $post_id = (int) $data['post_id'];
    58255825
    58265826                        if ( ! current_user_can( 'edit_post', $post_id ) )
    5827                                 return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     5827                                return new IXR_Error( 401, __( 'Sorry, Sorry, you are not allowed to edit this post.' ) );
    58285828                }
    58295829                $attachment = array(
    58305830                        'post_title' => $name,
     
    59955995                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    59965996
    59975997                if ( !current_user_can( 'edit_post', $post_ID ) )
    5998                         return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) );
     5998                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    59995999
    60006000                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    60016001                do_action( 'xmlrpc_call', 'mt.getPostCategories' );
     
    60496049                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    60506050
    60516051                if ( !current_user_can('edit_post', $post_ID) )
    6052                         return new IXR_Error(401, __('Sorry, you cannot edit this post.'));
     6052                        return new IXR_Error(401, __('Sorry, Sorry, you are not allowed to edit this post.'));
    60536053
    60546054                $catids = array();
    60556055                foreach ( $categories as $cat ) {
     
    61686168                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    61696169
    61706170                if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) )
    6171                         return new IXR_Error(401, __('Sorry, you cannot publish this post.'));
     6171                        return new IXR_Error(401, __('Sorry, Sorry, you are not allowed to publish this post.'));
    61726172
    61736173                $postdata['post_status'] = 'publish';
    61746174
  • wp-includes/deprecated.php

     
    16291629 * encode special characters and automatically display all of the content. The
    16301630 * value of '2' will strip all HTML tags from the content.
    16311631 *
    1632  * Also note that you cannot set the amount of words and not set the html
     1632 * Also note that Sorry, you are not allowed to set the amount of words and not set the html
    16331633 * encoding. If that is the case, then the html encoding will default to 2,
    16341634 * which will strip all HTML tags.
    16351635 *
  • wp-includes/link-template.php

     
    14511451function get_edit_bookmark_link( $link = 0 ) {
    14521452        $link = get_bookmark( $link );
    14531453
    1454         if ( !current_user_can('manage_links') )
     1454        if ( !current_user_can( 'manage_links' ) )
    14551455                return;
    14561456
    14571457        $location = admin_url('link.php?action=edit&amp;link_id=') . $link->link_id;
     
    14801480function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) {
    14811481        $bookmark = get_bookmark($bookmark);
    14821482
    1483         if ( !current_user_can('manage_links') )
     1483        if ( !current_user_can( 'manage_links' ) )
    14841484                return;
    14851485
    14861486        if ( empty($link) )
  • wp-includes/ms-functions.php

     
    438438        }
    439439
    440440        if ( is_email_address_unsafe( $user_email ) )
    441                 $errors->add('user_email',  __('You cannot use 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.'));
    442442
    443443        if ( strlen( $user_name ) < 4 )
    444444                $errors->add('user_name',  __( 'Username must be at least 4 characters.' ) );
  • wp-includes/rest-api/class-wp-rest-server.php

     
    879879                                                if ( is_wp_error( $permission ) ) {
    880880                                                        $response = $permission;
    881881                                                } else if ( false === $permission || null === $permission ) {
    882                                                         $response = new WP_Error( 'rest_forbidden', __( "You don't have permission to do this." ), array( 'status' => 403 ) );
     882                                                        $response = new WP_Error( 'rest_forbidden', __( "Sorry, you are not allowed to do this." ), array( 'status' => 403 ) );
    883883                                                }
    884884                                        }
    885885                                }
  • wp-includes/revision.php

     
    553553                $id = (int) $_GET['preview_id'];
    554554
    555555                if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
    556                         wp_die( __('You do not have permission to preview drafts.') );
     556                        wp_die( __('Sorry, you are not allowed to preview drafts.') );
    557557
    558558                add_filter('the_preview', '_set_preview');
    559559        }
  • wp-includes/script-loader.php

     
    124124
    125125        $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
    126126        did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
    127                 'noPerm' => __('You do not have permission to do that.'),
     127                'noPerm' => __('Sorry, you are not allowed to do that.'),
    128128                'broken' => __('An unidentified error has occurred.')
    129129        ) );
    130130
     
    444444                'cancel'             => __( 'Cancel' ),
    445445                'close'              => __( 'Close' ),
    446446                'cheatin'            => __( 'Cheatin&#8217; uh?' ),
    447                 'notAllowed'         => __( 'You are not allowed to customize this site.' ),
     447                'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
    448448                'previewIframeTitle' => __( 'Site Preview' ),
    449449                'loginIframeTitle'   => __( 'Session expired' ),
    450450                'collapseSidebar'    => __( 'Collapse Sidebar' ),
     
    484484        if ( is_admin() ) {
    485485                $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
    486486                did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
    487                         'noPerm' => __('You do not have permission to do that.'),
     487                        'noPerm' => __('Sorry, you are not allowed to do that.'),
    488488                        'broken' => __('An unidentified error has occurred.')
    489489                ));
    490490
  • wp-includes/update.php

     
    557557
    558558        if ( ( $core = current_user_can( 'update_core' ) ) && function_exists( 'get_core_updates' ) ) {
    559559                $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' ) )
    561561                        $counts['wordpress'] = 1;
    562562        }
    563563
  • wp-includes/widgets.php

     
    12321232        }
    12331233
    12341234        if ( is_wp_error($rss) ) {
    1235                 if ( is_admin() || current_user_can('manage_options') )
     1235                if ( is_admin() || current_user_can( 'manage_options' ) )
    12361236                        echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';
    12371237                return;
    12381238        }