From f5fafe1a2e6770049d5d7bcd7a56555e17a095a3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 8 Nov 2012 19:11:46 +0000 Subject: [PATCH] Don't show "Skip Cropping, Publish Image as Is" button for themes that do not support headers with flexible width or height. Forces too small images to be scaled to fit in the absence of flex support. Props MadtownLems, kobenland fixes #21100 git-svn-id: https://develop.svn.wordpress.org/trunk@22468 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/custom-header.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index cac583f352..e4daa7ed21 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -746,7 +746,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>

@@ -798,6 +798,9 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) wp_die( __( 'Cheatin’ uh?' ) ); + if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) + wp_die( __( 'Cheatin’ uh?' ) ); + if ( $_POST['oitar'] > 1 ) { $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; $_POST['y1'] = $_POST['y1'] * $_POST['oitar'];