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

    r41937 r42811  
    720720        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    721721            wp_die(
    722                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     722                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    723723                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    724724                403
     
    878878        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    879879            wp_die(
    880                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     880                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    881881                '<p>' . __( 'The current theme does not support uploading a custom header image.' ) . '</p>',
    882882                403
     
    886886        if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
    887887            wp_die(
    888                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     888                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    889889                '<p>' . __( 'The current theme does not support a flexible sized header image.' ) . '</p>',
    890890                403
Note: See TracChangeset for help on using the changeset viewer.