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/custom-header.php

    r42343 r42648  
    759759        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    760760            wp_die(
    761                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     761                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    762762                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    763763                403
     
    923923        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    924924            wp_die(
    925                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     925                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    926926                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    927927                403
     
    931931        if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
    932932            wp_die(
    933                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     933                '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
    934934                '<p>' . __( 'The current theme does not support a flexible sized header image.' ) . '</p>',
    935935                403
Note: See TracChangeset for help on using the changeset viewer.