From 1fd3c5471eb38ca0a22d369da48d1a0966595d7b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 10 Aug 2012 20:15:06 +0000 Subject: [PATCH] Avoid fatal error in the customizer when the current theme doesn't support custom headers. Props c3mdigital. fixes #21515 git-svn-id: http://core.svn.wordpress.org/trunk@21497 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-control.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php index c35225fa26..4d596bfe95 100644 --- a/wp-includes/class-wp-customize-control.php +++ b/wp-includes/class-wp-customize-control.php @@ -750,6 +750,8 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { */ public function prepare_control() { global $custom_image_header; + if ( empty( $custom_image_header ) ) + return parent::prepare_control(); // Process default headers and uploaded headers. $custom_image_header->process_default_headers();