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/edit-tags.php

    r41378 r42811  
    2424if ( ! current_user_can( $tax->cap->manage_terms ) ) {
    2525    wp_die(
    26         '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     26        '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    2727        '<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>',
    2828        403
     
    7373    if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    7474        wp_die(
    75             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     75            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    7676            '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
    7777            403
     
    9797    if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
    9898        wp_die(
    99             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     99            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    100100            '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    101101            403
     
    117117    if ( ! current_user_can( $tax->cap->delete_terms ) ) {
    118118        wp_die(
    119             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     119            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    120120            '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    121121            403
     
    153153    if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
    154154        wp_die(
    155             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     155            '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    156156            '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    157157            403
Note: See TracChangeset for help on using the changeset viewer.