equal
deleted
inserted
replaced
29 public function update( $value ) { |
29 public function update( $value ) { |
30 global $custom_image_header; |
30 global $custom_image_header; |
31 |
31 |
32 // If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin(). |
32 // If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin(). |
33 if ( empty( $custom_image_header ) ) { |
33 if ( empty( $custom_image_header ) ) { |
34 require_once( ABSPATH . 'wp-admin/custom-header.php' ); |
34 require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php'; |
35 $args = get_theme_support( 'custom-header' ); |
35 $args = get_theme_support( 'custom-header' ); |
36 $admin_head_callback = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null; |
36 $admin_head_callback = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null; |
37 $admin_preview_callback = isset( $args[0]['admin-preview-callback'] ) ? $args[0]['admin-preview-callback'] : null; |
37 $admin_preview_callback = isset( $args[0]['admin-preview-callback'] ) ? $args[0]['admin-preview-callback'] : null; |
38 $custom_image_header = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback ); |
38 $custom_image_header = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback ); |
39 } |
39 } |