Avoid fatal error in the customizer when the current theme doesn't support custom headers. Props c3mdigital. fixes #21515
git-svn-id: https://develop.svn.wordpress.org/trunk@21497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9580f65af6
commit
1096d07b11
|
@ -750,6 +750,8 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||||
*/
|
*/
|
||||||
public function prepare_control() {
|
public function prepare_control() {
|
||||||
global $custom_image_header;
|
global $custom_image_header;
|
||||||
|
if ( empty( $custom_image_header ) )
|
||||||
|
return parent::prepare_control();
|
||||||
|
|
||||||
// Process default headers and uploaded headers.
|
// Process default headers and uploaded headers.
|
||||||
$custom_image_header->process_default_headers();
|
$custom_image_header->process_default_headers();
|
||||||
|
|
Loading…
Reference in New Issue