Make WordPress Core


Ignore:
Timestamp:
03/09/2018 12:14:20 AM (9 years ago)
Author:
SergeyBiryukov
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, kristastevens for language; dmsnell for original patch; peterwilsoncc.
Merged [42648] and [42719] to the 4.9 branch.
Fixes #38332.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/media-upload.php

    r38307 r42811  
    3535if ( isset( $action ) && $action == 'edit' && !$ID ) {
    3636        wp_die(
    37                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     37                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    3838                '<p>' . __( 'Invalid item ID.' ) . '</p>',
    3939                403
    … …  
    4343if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
    4444        wp_die(
    45                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     45                '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    4646                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    4747                403
Note: See TracChangeset for help on using the changeset viewer.