diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 1738101f73..659512df1e 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -456,7 +456,7 @@ class Custom_Image_Header { - +
+ show_default_header_selector(); ?> @@ -570,6 +575,9 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> */ function step_2() { check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload'); + if ( ! current_theme_supports( 'custom-header-uploads' ) ) + wp_die( 'Cheatin’ uh?' ); + $overrides = array('test_form' => false); $file = wp_handle_upload($_FILES['import'], $overrides); @@ -650,6 +658,9 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> */ function step_3() { check_admin_referer('custom-header-crop-image'); + if ( ! current_theme_supports( 'custom-header-uploads' ) ) + wp_die( 'Cheatin’ uh?' ); + if ( $_POST['oitar'] > 1 ) { $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; $_POST['y1'] = $_POST['y1'] * $_POST['oitar']; diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 0064b4d5a6..a17a83b08f 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1467,6 +1467,7 @@ function add_custom_image_header($header_callback, $admin_header_callback, $admi add_action('wp_head', $header_callback); add_theme_support( 'custom-header' ); + add_theme_support( 'custom-header-uploads' ); if ( ! is_admin() ) return;