WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/05/2018 02:29:53 AM (3 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/media-upload.php

    r42343 r42648  
    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
     
    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 permission to do this.' ) . '</h1>' .
    4747        '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    4848        403
Note: See TracChangeset for help on using the changeset viewer.