diff --git a/src/wp-admin/custom-header.php b/src/wp-admin/custom-header.php index e61feb781c..ba9bb72dd4 100644 --- a/src/wp-admin/custom-header.php +++ b/src/wp-admin/custom-header.php @@ -683,8 +683,13 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> */ public function step_2() { check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload'); - if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) - wp_die( __( 'Cheatin’ uh?' ), 403 ); + if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) { + wp_die( + '
' . __( 'The current theme does not support uploading a custom header image.' ) . '
', + 403 + ); + } if ( empty( $_POST ) && isset( $_GET['file'] ) ) { $attachment_id = absint( $_GET['file'] ); @@ -834,11 +839,21 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> public function step_3() { check_admin_referer( 'custom-header-crop-image' ); - if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) - wp_die( __( 'Cheatin’ uh?' ), 403 ); + if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) { + wp_die( + '' . __( 'The current theme does not support uploading a custom header image.' ) . '
', + 403 + ); + } - if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) - wp_die( __( 'Cheatin’ uh?' ), 403 ); + if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) { + wp_die( + '' . __( 'The current theme does not support a flexible sized header image.' ) . '
', + 403 + ); + } if ( $_POST['oitar'] > 1 ) { $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];