Make WordPress Core

Ticket #14530: 14530-2.patch

File 14530-2.patch, 13.2 KB (added by kraftbj, 12 years ago)

Change to You do not have permission to view this page.

  • wp-admin/custom-header.php

     
    648648        function step_2() {
    649649                check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
    650650                if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
    651                         wp_die( __( 'Cheatin’ uh?' ) );
     651                        wp_die( __( 'You do not have permission to view this page.' ) );
    652652
    653653                if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
    654654                        $attachment_id = absint( $_GET['file'] );
     
    787787                check_admin_referer( 'custom-header-crop-image' );
    788788
    789789                if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
    790                         wp_die( __( 'Cheatin’ uh?' ) );
     790                        wp_die( __( 'You do not have permission to view this page.' ) );
    791791
    792792                if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
    793                         wp_die( __( 'Cheatin’ uh?' ) );
     793                        wp_die( __( 'You do not have permission to view this page.' ) );
    794794
    795795                if ( $_POST['oitar'] > 1 ) {
    796796                        $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
  • wp-admin/customize.php

     
    1111
    1212require_once( './admin.php' );
    1313if ( ! current_user_can( 'edit_theme_options' ) )
    14         wp_die( __( 'Cheatin’ uh?' ) );
     14        wp_die( __( 'You do not have permission to view this page.' ) );
    1515
    1616wp_reset_vars( array( 'url', 'return' ) );
    1717$url = urldecode( $url );
  • wp-admin/edit-comments.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once('./admin.php');
    1111if ( !current_user_can('edit_posts') )
    12         wp_die(__('Cheatin’ uh?'));
     12        wp_die(__('You do not have permission to view this page.'));
    1313
    1414$wp_list_table = _get_list_table('WP_Comments_List_Table');
    1515$pagenum = $wp_list_table->get_pagenum();
  • wp-admin/edit-tags.php

     
    1818        wp_die( __( 'Invalid taxonomy' ) );
    1919
    2020if ( ! current_user_can( $tax->cap->manage_terms ) )
    21         wp_die( __( 'Cheatin’ uh?' ) );
     21        wp_die( __( 'You do not have permission to view this page.' ) );
    2222
    2323$wp_list_table = _get_list_table('WP_Terms_List_Table');
    2424$pagenum = $wp_list_table->get_pagenum();
     
    4545        check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
    4646
    4747        if ( !current_user_can( $tax->cap->edit_terms ) )
    48                 wp_die( __( 'Cheatin’ uh?' ) );
     48                wp_die( __( 'You do not have permission to view this page.' ) );
    4949
    5050        $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
    5151        $location = 'edit-tags.php?taxonomy=' . $taxonomy;
     
    8383        check_admin_referer( 'delete-tag_' . $tag_ID );
    8484
    8585        if ( !current_user_can( $tax->cap->delete_terms ) )
    86                 wp_die( __( 'Cheatin’ uh?' ) );
     86                wp_die( __( 'You do not have permission to view this page.' ) );
    8787
    8888        wp_delete_term( $tag_ID, $taxonomy );
    8989
     
    9797        check_admin_referer( 'bulk-tags' );
    9898
    9999        if ( !current_user_can( $tax->cap->delete_terms ) )
    100                 wp_die( __( 'Cheatin’ uh?' ) );
     100                wp_die( __( 'You do not have permission to view this page.' ) );
    101101
    102102        $tags = (array) $_REQUEST['delete_tags'];
    103103        foreach ( $tags as $tag_ID ) {
     
    136136        check_admin_referer( 'update-tag_' . $tag_ID );
    137137
    138138        if ( !current_user_can( $tax->cap->edit_terms ) )
    139                 wp_die( __( 'Cheatin’ uh?' ) );
     139                wp_die( __( 'You do not have permission to view this page.' ) );
    140140
    141141        $tag = get_term( $tag_ID, $taxonomy );
    142142        if ( ! $tag )
  • wp-admin/edit.php

     
    1919        wp_die( __( 'Invalid post type' ) );
    2020
    2121if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
    22         wp_die( __( 'Cheatin’ uh?' ) );
     22        wp_die( __( 'You do not have permission to view this page.' ) );
    2323
    2424$wp_list_table = _get_list_table('WP_Posts_List_Table');
    2525$pagenum = $wp_list_table->get_pagenum();
  • wp-admin/includes/bookmark.php

     
    2727 */
    2828function edit_link( $link_id = 0 ) {
    2929        if ( !current_user_can( 'manage_links' ) )
    30                 wp_die( __( 'Cheatin’ uh?' ) );
     30                wp_die( __( 'You do not have permission to view this page.' ) );
    3131
    3232        $_POST['link_url'] = esc_html( $_POST['link_url'] );
    3333        $_POST['link_url'] = esc_url($_POST['link_url']);
  • wp-admin/media-upload.php

     
    3232
    3333// Require an ID for the edit screen
    3434if ( isset($action) && $action == 'edit' && !$ID )
    35         wp_die( __( 'Cheatin’ uh?' ) );
     35        wp_die( __( 'You do not have permission to view this page.' ) );
    3636
    3737        if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
    38                 wp_die( __( 'Cheatin’ uh?' ) );
     38                wp_die( __( 'You do not have permission to view this page.' ) );
    3939
    4040        // upload type: image, video, file, ..?
    4141        if ( isset($_GET['type']) )
  • wp-admin/nav-menus.php

     
    2020
    2121// Permissions Check
    2222if ( ! current_user_can('edit_theme_options') )
    23         wp_die( __( 'Cheatin’ uh?' ) );
     23        wp_die( __( 'You do not have permission to view this page.' ) );
    2424
    2525wp_enqueue_script( 'nav-menu' );
    2626
  • wp-admin/network/site-users.php

     
    135135
    136136                                        // If the user doesn't already belong to the blog, bail.
    137137                                        if ( !is_user_member_of_blog( $user_id ) )
    138                                                 wp_die(__('Cheatin’ uh?'));
     138                                                wp_die(__('You do not have permission to view this page.'));
    139139
    140140                                        $user = get_userdata( $user_id );
    141141                                        $user->set_role( $_REQUEST['new_role'] );
  • wp-admin/options.php

     
    3232        $capability = apply_filters( "option_page_capability_{$option_page}", $capability );
    3333
    3434if ( !current_user_can( $capability ) )
    35         wp_die(__('Cheatin’ uh?'));
     35        wp_die(__('You do not have permission to view this page.'));
    3636
    3737// Handle admin email change requests
    3838if ( is_multisite() ) {
     
    5656}
    5757
    5858if ( is_multisite() && !is_super_admin() && 'update' != $action )
    59         wp_die(__('Cheatin’ uh?'));
     59        wp_die(__('You do not have permission to view this page.'));
    6060
    6161$whitelist_options = array(
    6262        'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ),
  • wp-admin/post-new.php

     
    4040$editing = true;
    4141
    4242if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) )
    43         wp_die( __( 'Cheatin’ uh?' ) );
     43        wp_die( __( 'You do not have permission to view this page.' ) );
    4444
    4545// Schedule auto-draft cleanup
    4646if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
  • wp-admin/press-this.php

     
    1414header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    1515
    1616if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) )
    17         wp_die( __( 'Cheatin’ uh?' ) );
     17        wp_die( __( 'You do not have permission to view this page.' ) );
    1818
    1919/**
    2020 * Press It form handler.
  • wp-admin/themes.php

     
    1010require_once('./admin.php');
    1111
    1212if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
    13         wp_die( __( 'Cheatin’ uh?' ) );
     13        wp_die( __( 'You do not have permission to view this page.' ) );
    1414
    1515$wp_list_table = _get_list_table('WP_Themes_List_Table');
    1616
     
    1919                check_admin_referer('switch-theme_' . $_GET['stylesheet']);
    2020                $theme = wp_get_theme( $_GET['stylesheet'] );
    2121                if ( ! $theme->exists() || ! $theme->is_allowed() )
    22                         wp_die( __( 'Cheatin’ uh?' ) );
     22                        wp_die( __( 'You do not have permission to view this page.' ) );
    2323                switch_theme( $theme->get_stylesheet() );
    2424                wp_redirect( admin_url('themes.php?activated=true') );
    2525                exit;
     
    2727                check_admin_referer('delete-theme_' . $_GET['stylesheet']);
    2828                $theme = wp_get_theme( $_GET['stylesheet'] );
    2929                if ( !current_user_can('delete_themes') || ! $theme->exists() )
    30                         wp_die( __( 'Cheatin’ uh?' ) );
     30                        wp_die( __( 'You do not have permission to view this page.' ) );
    3131                delete_theme($_GET['stylesheet']);
    3232                wp_redirect( admin_url('themes.php?deleted=true') );
    3333                exit;
  • wp-admin/user-new.php

     
    1111
    1212if ( is_multisite() ) {
    1313        if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) )
    14                 wp_die( __( 'Cheatin’ uh?' ) );
     14                wp_die( __( 'You do not have permission to view this page.' ) );
    1515} elseif ( ! current_user_can( 'create_users' ) ) {
    16         wp_die( __( 'Cheatin’ uh?' ) );
     16        wp_die( __( 'You do not have permission to view this page.' ) );
    1717}
    1818
    1919if ( is_multisite() ) {
     
    5858        }
    5959
    6060        if ( ! current_user_can('promote_user', $user_details->ID) )
    61                 wp_die(__('Cheatin’ uh?'));
     61                wp_die(__('You do not have permission to view this page.'));
    6262
    6363        // Adding an existing user to this blog
    6464        $new_user_email = $user_details->user_email;
     
    9595        check_admin_referer( 'create-user', '_wpnonce_create-user' );
    9696
    9797        if ( ! current_user_can('create_users') )
    98                 wp_die(__('Cheatin’ uh?'));
     98                wp_die(__('You do not have permission to view this page.'));
    9999
    100100        if ( ! is_multisite() ) {
    101101                $user_id = edit_user();
  • wp-admin/users.php

     
    1010require_once( './admin.php' );
    1111
    1212if ( ! current_user_can( 'list_users' ) )
    13         wp_die( __( 'Cheatin’ uh?' ) );
     13        wp_die( __( 'You do not have permission to view this page.' ) );
    1414
    1515$wp_list_table = _get_list_table('WP_Users_List_Table');
    1616$pagenum = $wp_list_table->get_pagenum();
     
    125125
    126126                // If the user doesn't already belong to the blog, bail.
    127127                if ( is_multisite() && !is_user_member_of_blog( $id ) )
    128                         wp_die(__('Cheatin’ uh?'));
     128                        wp_die(__('You do not have permission to view this page.'));
    129129
    130130                $user = get_userdata( $id );
    131131                $user->set_role($_REQUEST['new_role']);
  • wp-admin/widgets.php

     
    1313require_once(ABSPATH . 'wp-admin/includes/widgets.php');
    1414
    1515if ( ! current_user_can('edit_theme_options') )
    16         wp_die( __( 'Cheatin’ uh?' ));
     16        wp_die( __( 'You do not have permission to view this page.' ));
    1717
    1818$widgets_access = get_user_setting( 'widgets_access' );
    1919if ( isset($_GET['widgets-access']) ) {
  • wp-includes/class-wp-customize-manager.php

     
    8080                        wp_die( $ajax_message );
    8181
    8282                if ( ! $message )
    83                         $message = __( 'Cheatin’ uh?' );
     83                        $message = __( 'You do not have permission to view this page.' );
    8484
    8585                wp_die( $message );
    8686        }
  • wp-includes/script-loader.php

     
    325325                'saved'     => __( 'Saved' ),
    326326                'cancel'    => __( 'Cancel' ),
    327327                'close'     => __( 'Close' ),
    328                 'cheatin'   => __( 'Cheatin’ uh?' ),
     328                'cheatin'   => __( 'You do not have permission to view this page.' ),
    329329
    330330                // Used for overriding the file types allowed in plupload.
    331331                'allowedFiles' => __( 'Allowed Files' ),