Make WordPress Core


Ignore:
Timestamp:
03/09/2018 12:14:20 AM (7 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/customize.php

    r42535 r42811  
    1515if ( ! current_user_can( 'customize' ) ) {
    1616    wp_die(
    17         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     17        '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    1818        '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
    1919        403
     
    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 need a higher level of permission.' ) . '</h1>' .
    3535            '<p>' . __( 'Sorry, you are not allowed to edit this changeset.' ) . '</p>',
    3636            403
     
    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>' . __( 'Something went wrong.' ) . '</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>',
Note: See TracChangeset for help on using the changeset viewer.