wp/wp-includes/customize/class-wp-customize-header-image-setting.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 19 3d72ae0968f4
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    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 		}