Make WordPress Core


Ignore:
Timestamp:
02/05/2018 02:29:53 AM (9 years ago)
Author:
peterwilsoncc
Message:

General: Replace Cheatin’ uh? with friendlier error messages.

While intended as a playful error message, Cheatin’ uh? can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options.php

    r42606 r42648  
    4747if ( ! current_user_can( $capability ) ) {
    4848        wp_die(
    49                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     49                '<h1>' . __( 'You don&#8217;t have permission to do this.' ) . '</h1>' .
    5050                '<p>' . __( 'Sorry, you are not allowed to manage these options.' ) . '</p>',
    5151                403
    … …  
    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 permission to do this.' ) . '</h1>' .
    7878                '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    7979                403
Note: See TracChangeset for help on using the changeset viewer.