Make WordPress Core


Ignore:
Timestamp:
02/08/2025 03:51:03 PM (12 months ago)
Author:
audrasjb
Message:

Administration: Error messages improvements in WP Admin.

This changeset improves a bunch of WP-Admin error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.

Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
See #43622.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-custom-image-header.php

    r59554 r59789  
    831831        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    832832            wp_die(
    833                 '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    834                 '<p>' . __( 'The active theme does not support uploading a custom header image.' ) . '</p>',
     833                '<h1>' . __( 'An error occurred while processing your header image.' ) . '</h1>' .
     834                '<p>' . __( 'The active theme does not support uploading a custom header image. Please ensure your theme supports custom headers and try again.' ) . '</p>',
    835835                403
    836836            );
     
    10191019        if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
    10201020            wp_die(
    1021                 '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    1022                 '<p>' . __( 'The active theme does not support uploading a custom header image.' ) . '</p>',
     1021                '<h1>' . __( 'An error occurred while processing your header image.' ) . '</h1>' .
     1022                '<p>' . __( 'The active theme does not support uploading a custom header image. Please ensure your theme supports custom headers and try again.' ) . '</p>',
    10231023                403
    10241024            );
     
    10301030        ) {
    10311031            wp_die(
    1032                 '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
     1032                '<h1>' . __( 'An error occurred while processing your header image.' ) . '</h1>' .
    10331033                '<p>' . __( 'The active theme does not support a flexible sized header image.' ) . '</p>',
    10341034                403
Note: See TracChangeset for help on using the changeset viewer.