WordPress.org

Make WordPress Core


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

    r42264 r42811  
    1313    if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
    1414        wp_die(
    15             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     15            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    1616            '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
    1717            403
     
    2020} elseif ( ! current_user_can( 'create_users' ) ) {
    2121    wp_die(
    22         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     22        '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    2323        '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    2424        403
     
    5353    if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
    5454        wp_die(
    55             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     55            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    5656            '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
    5757            403
     
    119119    if ( ! current_user_can( 'create_users' ) ) {
    120120        wp_die(
    121             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     121            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    122122            '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
    123123            403
Note: See TracChangeset for help on using the changeset viewer.