Make WordPress Core

Ticket #38332: 38332.diff

File 38332.diff, 21.1 KB (added by peterwilsoncc, 7 years ago)
  • src/wp-admin/custom-header.php

    diff --git src/wp-admin/custom-header.php src/wp-admin/custom-header.php
    index c1a7896589..a8ca1d527b 100644
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); 
    758758                check_admin_referer( 'custom-header-upload', '_wpnonce-custom-header-upload' );
    759759                if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    760760                        wp_die(
    761                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     761                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    762762                                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    763763                                403
    764764                        );
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); 
    922922
    923923                if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    924924                        wp_die(
    925                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     925                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    926926                                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    927927                                403
    928928                        );
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); 
    930930
    931931                if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
    932932                        wp_die(
    933                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     933                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    934934                                '<p>' . __( 'The current theme does not support a flexible sized header image.' ) . '</p>',
    935935                                403
    936936                        );
  • src/wp-admin/customize.php

    diff --git src/wp-admin/customize.php src/wp-admin/customize.php
    index e54e2170bb..bf9d858bc8 100644
    require_once( dirname( __FILE__ ) . '/admin.php' ); 
    1414
    1515if ( ! current_user_can( 'customize' ) ) {
    1616        wp_die(
    17                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     17                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1818                '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
    1919                403
    2020        );
    if ( $wp_customize->changeset_post_id() ) { 
    3131
    3232        if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post->ID ) ) {
    3333                wp_die(
    34                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     34                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    3535                        '<p>' . __( 'Sorry, you are not allowed to edit this changeset.' ) . '</p>',
    3636                        403
    3737                );
    if ( $wp_customize->changeset_post_id() ) { 
    7676
    7777        if ( in_array( get_post_status( $changeset_post->ID ), array( 'publish', 'trash' ), true ) ) {
    7878                wp_die(
    79                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     79                        '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    8080                        '<p>' . __( 'This changeset cannot be further modified.' ) . '</p>' .
    8181                        '<p><a href="' . esc_url( remove_query_arg( 'changeset_uuid' ) ) . '">' . __( 'Customize New Changes' ) . '</a></p>',
    8282                        403
  • src/wp-admin/edit-comments.php

    diff --git src/wp-admin/edit-comments.php src/wp-admin/edit-comments.php
    index 85c04ead57..b671df86df 100644
     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111if ( ! current_user_can( 'edit_posts' ) ) {
    1212        wp_die(
    13                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     13                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1414                '<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
    1515                403
    1616        );
  • src/wp-admin/edit-tags.php

    diff --git src/wp-admin/edit-tags.php src/wp-admin/edit-tags.php
    index c49b61b2cb..c5958843fe 100644
    if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { 
    2525
    2626if ( ! current_user_can( $tax->cap->manage_terms ) ) {
    2727        wp_die(
    28                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     28                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    2929                '<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>',
    3030                403
    3131        );
    switch ( $wp_list_table->current_action() ) { 
    8181
    8282                if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    8383                        wp_die(
    84                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     84                                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    8585                                '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
    8686                                403
    8787                        );
    switch ( $wp_list_table->current_action() ) { 
    111111
    112112                if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
    113113                        wp_die(
    114                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     114                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    115115                                '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    116116                                403
    117117                        );
    switch ( $wp_list_table->current_action() ) { 
    131131
    132132                if ( ! current_user_can( $tax->cap->delete_terms ) ) {
    133133                        wp_die(
    134                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     134                                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    135135                                '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    136136                                403
    137137                        );
    switch ( $wp_list_table->current_action() ) { 
    167167
    168168                if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
    169169                        wp_die(
    170                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     170                                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    171171                                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    172172                                403
    173173                        );
  • src/wp-admin/edit.php

    diff --git src/wp-admin/edit.php src/wp-admin/edit.php
    index f629734c18..690dae39e4 100644
    if ( ! $post_type_object ) { 
    3838
    3939if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
    4040        wp_die(
    41                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     41                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    4242                '<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>',
    4343                403
    4444        );
  • src/wp-admin/includes/bookmark.php

    diff --git src/wp-admin/includes/bookmark.php src/wp-admin/includes/bookmark.php
    index 285d716c2a..27c5a6aded 100644
    function add_link() { 
    2828function edit_link( $link_id = 0 ) {
    2929        if ( ! current_user_can( 'manage_links' ) ) {
    3030                wp_die(
    31                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     31                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    3232                        '<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>',
    3333                        403
    3434                );
  • src/wp-admin/includes/file.php

    diff --git src/wp-admin/includes/file.php src/wp-admin/includes/file.php
    index fe05085dd8..2b1c5b1864 100644
    function wp_edit_theme_plugin_file( $args ) { 
    591591                        }
    592592
    593593                        if ( ! isset( $result['message'] ) ) {
    594                                 $message = __( 'An unidentified error has occurred.' );
     594                                $message = __( 'An error has occurred.' );
    595595                        } else {
    596596                                $message = $result['message'];
    597597                                unset( $result['message'] );
  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index d9db2e600a..462e177970 100644
     
    68366836
    68376837                cheatin: function() {
    68386838                        $( document.body ).empty().addClass( 'cheatin' ).append(
    6839                                 '<h1>' + api.l10n.cheatin + '</h1>' +
     6839                                '<h1>' + api.l10n.dontHaveAccessToArea + '</h1>' +
    68406840                                '<p>' + api.l10n.notAllowed + '</p>'
    68416841                        );
    68426842                },
  • src/wp-admin/media-upload.php

    diff --git src/wp-admin/media-upload.php src/wp-admin/media-upload.php
    index 7b0bd53806..23ab8c15fb 100644
    $post_id = isset( $post_id ) ? (int) $post_id : 0; 
    3535// Require an ID for the edit screen.
    3636if ( isset( $action ) && $action == 'edit' && ! $ID ) {
    3737        wp_die(
    38                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     38                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    3939                '<p>' . __( 'Invalid item ID.' ) . '</p>',
    4040                403
    4141        );
    if ( isset( $action ) && $action == 'edit' && ! $ID ) { 
    4343
    4444if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post', $_REQUEST['post_id'] ) ) {
    4545        wp_die(
    46                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     46                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    4747                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    4848                403
    4949        );
  • src/wp-admin/nav-menus.php

    diff --git src/wp-admin/nav-menus.php src/wp-admin/nav-menus.php
    index c73a05878a..4cf2c2c4f7 100644
    if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' 
    2222// Permissions Check
    2323if ( ! current_user_can( 'edit_theme_options' ) ) {
    2424        wp_die(
    25                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     25                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    2626                '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
    2727                403
    2828        );
  • src/wp-admin/network/site-users.php

    diff --git src/wp-admin/network/site-users.php src/wp-admin/network/site-users.php
    index d1a125b844..6adaefe6a7 100644
    if ( $action ) { 
    159159                                        // If the user doesn't already belong to the blog, bail.
    160160                                        if ( ! is_user_member_of_blog( $user_id ) ) {
    161161                                                wp_die(
    162                                                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     162                                                        '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    163163                                                        '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
    164164                                                        403
    165165                                                );
  • src/wp-admin/options.php

    diff --git src/wp-admin/options.php src/wp-admin/options.php
    index b2ecfc816e..e391c8d8db 100644
    if ( empty( $option_page ) ) { 
    4646
    4747if ( ! current_user_can( $capability ) ) {
    4848        wp_die(
    49                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     49                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    5050                '<p>' . __( 'Sorry, you are not allowed to manage these options.' ) . '</p>',
    5151                403
    5252        );
    if ( ! empty( $_GET['adminhash'] ) ) { 
    7474
    7575if ( is_multisite() && ! current_user_can( 'manage_network_options' ) && 'update' != $action ) {
    7676        wp_die(
    77                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     77                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    7878                '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    7979                403
    8080        );
  • src/wp-admin/post-new.php

    diff --git src/wp-admin/post-new.php src/wp-admin/post-new.php
    index 7c09650b85..0c0089c63f 100644
    $editing = true; 
    5757
    5858if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
    5959        wp_die(
    60                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     60                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    6161                '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
    6262                403
    6363        );
  • src/wp-admin/press-this.php

    diff --git src/wp-admin/press-this.php src/wp-admin/press-this.php
    index 8f97728fec..9f80b234dc 100644
    function wp_load_press_this() { 
    1818        if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    1919                wp_die(
    2020                        __( 'Sorry, you are not allowed to create posts as this user.' ),
    21                         __( 'Cheatin&#8217; uh?' ),
     21                        __( 'You don&#8217;t have access to this area.' ),
    2222                        403
    2323                );
    2424        } elseif ( is_plugin_active( $plugin_file ) ) {
  • src/wp-admin/term.php

    diff --git src/wp-admin/term.php src/wp-admin/term.php
    index b8331828b4..1067b1ad12 100644
    if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) || 
    3434        ! current_user_can( 'edit_term', $tag->term_id ) ) {
    3535
    3636        wp_die(
    37                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     37                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    3838                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    3939                403
    4040        );
  • src/wp-admin/themes.php

    diff --git src/wp-admin/themes.php src/wp-admin/themes.php
    index b399f92f67..3286f73bbb 100644
    require_once( dirname( __FILE__ ) . '/admin.php' ); 
    1111
    1212if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    1313        wp_die(
    14                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     14                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1515                '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
    1616                403
    1717        );
    if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) { 
    2424
    2525                if ( ! $theme->exists() || ! $theme->is_allowed() ) {
    2626                        wp_die(
    27                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     27                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    2828                                '<p>' . __( 'The requested theme does not exist.' ) . '</p>',
    2929                                403
    3030                        );
    if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) { 
    3939
    4040                if ( ! current_user_can( 'delete_themes' ) ) {
    4141                        wp_die(
    42                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     42                                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    4343                                '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    4444                                403
    4545                        );
    if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) { 
    4747
    4848                if ( ! $theme->exists() ) {
    4949                        wp_die(
    50                                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     50                                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    5151                                '<p>' . __( 'The requested theme does not exist.' ) . '</p>',
    5252                                403
    5353                        );
  • src/wp-admin/user-new.php

    diff --git src/wp-admin/user-new.php src/wp-admin/user-new.php
    index 59e68dad76..9495f0808f 100644
    require_once( dirname( __FILE__ ) . '/admin.php' ); 
    1212if ( is_multisite() ) {
    1313        if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
    1414                wp_die(
    15                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     15                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1616                        '<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(
    22                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     22                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    2323                '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    2424                403
    2525        );
    if ( isset( $_REQUEST['action'] ) && 'adduser' == $_REQUEST['action'] ) { 
    5252
    5353        if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
    5454                wp_die(
    55                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     55                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    5656                        '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
    5757                        403
    5858                );
    Please click the following link to confirm the invite: 
    136136
    137137        if ( ! current_user_can( 'create_users' ) ) {
    138138                wp_die(
    139                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     139                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    140140                        '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    141141                        403
    142142                );
  • src/wp-admin/users.php

    diff --git src/wp-admin/users.php src/wp-admin/users.php
    index ac47c392c4..01aeca979e 100644
    require_once( dirname( __FILE__ ) . '/admin.php' ); 
    1212
    1313if ( ! current_user_can( 'list_users' ) ) {
    1414        wp_die(
    15                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     15                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1616                '<p>' . __( 'Sorry, you are not allowed to list users.' ) . '</p>',
    1717                403
    1818        );
    switch ( $wp_list_table->current_action() ) { 
    141141                        // If the user doesn't already belong to the blog, bail.
    142142                        if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
    143143                                wp_die(
    144                                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     144                                        '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    145145                                        '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
    146146                                        403
    147147                                );
  • src/wp-admin/widgets.php

    diff --git src/wp-admin/widgets.php src/wp-admin/widgets.php
    index 533767023a..c4343d9918 100644
    require_once( ABSPATH . 'wp-admin/includes/widgets.php' ); 
    1414
    1515if ( ! current_user_can( 'edit_theme_options' ) ) {
    1616        wp_die(
    17                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     17                '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    1818                '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
    1919                403
    2020        );
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index fe22d87a06..fa2cc68702 100644
    final class WP_Customize_Manager { 
    447447                }
    448448
    449449                if ( ! $message ) {
    450                         $message = __( 'Cheatin&#8217; uh?' );
     450                        $message = __( 'An error has occurred.' );
    451451                }
    452452
    453453                if ( $this->messenger_channel ) {
    final class WP_Customize_Manager { 
    512512                                auth_redirect();
    513513                        } else {
    514514                                wp_die(
    515                                         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     515                                        '<h1>' . __( 'You don&#8217;t have access to this area.' ) . '</h1>' .
    516516                                        '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
    517517                                        403
    518518                                );
  • src/wp-includes/class-wp-xmlrpc-server.php

    diff --git src/wp-includes/class-wp-xmlrpc-server.php src/wp-includes/class-wp-xmlrpc-server.php
    index c6e6cd8002..3552ac1a95 100644
    class wp_xmlrpc_server extends IXR_Server { 
    38793879                }
    38803880
    38813881                if ( ! $comment_ID ) {
    3882                         return new IXR_Error( 403, __( 'An unidentified error has occurred.' ) );
     3882                        return new IXR_Error( 403, __( 'An error has occurred.' ) );
    38833883                }
    38843884
    38853885                /**
  • src/wp-includes/functions.php

    diff --git src/wp-includes/functions.php src/wp-includes/functions.php
    index 7d41b37aef..1dbe3e393a 100644
    function wp_nonce_ays( $action ) { 
    27182718                        wp_logout_url( $redirect_to )
    27192719                );
    27202720        } else {
    2721                 $html = __( 'Are you sure you want to do this?' );
     2721                $html = __( 'The link you followed has expired.' );
    27222722                if ( wp_get_referer() ) {
    27232723                        $html .= '</p><p>';
    27242724                        $html .= sprintf(
    function wp_nonce_ays( $action ) { 
    27292729                }
    27302730        }
    27312731
    2732         wp_die( $html, __( 'WordPress Failure Notice' ), 403 );
     2732        wp_die( $html, __( 'An error has occurred.' ), 403 );
    27332733}
    27342734
    27352735/**
  • src/wp-includes/js/wp-ajax-response.js

    diff --git src/wp-includes/js/wp-ajax-response.js src/wp-includes/js/wp-ajax-response.js
    index 50c66525af..b54eb0354e 100644
    var wpAjax = jQuery.extend( { 
    5656                selector = jQuery( selector );
    5757                return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).length;
    5858        }
    59 }, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'An unidentified error has occurred.' } );
     59}, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'An error has occurred.' } );
    6060
    6161// Basic form validation
    6262jQuery(document).ready( function($){
  • src/wp-includes/script-loader.php

    diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
    index a490e6c5af..71ea2e4955 100644
    function wp_default_scripts( &$scripts ) { 
    137137        did_action( 'init' ) && $scripts->localize(
    138138                'wp-ajax-response', 'wpAjax', array(
    139139                        'noPerm' => __( 'Sorry, you are not allowed to do that.' ),
    140                         'broken' => __( 'An unidentified error has occurred.' ),
     140                        'broken' => __( 'An error has occurred.' ),
    141141                )
    142142        );
    143143
    function wp_default_scripts( &$scripts ) { 
    604604                        'close'                   => __( 'Close' ),
    605605                        'action'                  => __( 'Action' ),
    606606                        'discardChanges'          => __( 'Discard changes' ),
    607                         'cheatin'                 => __( 'Cheatin&#8217; uh?' ),
     607                        'cheatin'                 => __( 'An error has occurred.' ),
     608                        'dontHaveAccessToArea'    => __( 'You don&#8217;t have access to this area.'),
    608609                        'notAllowed'              => __( 'Sorry, you are not allowed to customize this site.' ),
    609610                        'previewIframeTitle'      => __( 'Site Preview' ),
    610611                        'loginIframeTitle'        => __( 'Session expired' ),
    function wp_default_scripts( &$scripts ) { 
    687688                did_action( 'init' ) && $scripts->localize(
    688689                        'admin-tags', 'tagsl10n', array(
    689690                                'noPerm' => __( 'Sorry, you are not allowed to do that.' ),
    690                                 'broken' => __( 'An unidentified error has occurred.' ),
     691                                'broken' => __( 'An error has occurred.' ),
    691692                        )
    692693                );
    693694
    function wp_default_scripts( &$scripts ) { 
    905906                                        'activateImporter'         => __( 'Run Importer' ),
    906907                                        /* translators: %s: Importer name */
    907908                                        'activateImporterLabel'    => __( 'Run %s' ),
    908                                         'unknownError'             => __( 'An unidentified error has occurred.' ),
     909                                        'unknownError'             => __( 'An error has occurred.' ),
    909910                                        'connectionError'          => __( 'Connection lost or the server is busy. Please try again later.' ),
    910911                                        'nonceError'               => __( 'An error has occurred. Please reload the page and try again.' ),
    911912                                        'pluginsFound'             => __( 'Number of plugins found: %d' ),