Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-inclu.../customiz...
File: class-wp-customize-header-image-setting.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Customize API: WP_Customize_Header_Image_Setting class
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Customize
[5] Fix | Delete
* @since 4.4.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* A setting that is used to filter a value, but will not save the results.
[10] Fix | Delete
*
[11] Fix | Delete
* Results should be properly handled using another setting or callback.
[12] Fix | Delete
*
[13] Fix | Delete
* @since 3.4.0
[14] Fix | Delete
*
[15] Fix | Delete
* @see WP_Customize_Setting
[16] Fix | Delete
*/
[17] Fix | Delete
final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Unique string identifier for the setting.
[21] Fix | Delete
*
[22] Fix | Delete
* @since 3.4.0
[23] Fix | Delete
* @var string
[24] Fix | Delete
*/
[25] Fix | Delete
public $id = 'header_image_data';
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* @since 3.4.0
[29] Fix | Delete
*
[30] Fix | Delete
* @global Custom_Image_Header $custom_image_header
[31] Fix | Delete
*
[32] Fix | Delete
* @param mixed $value The value to update.
[33] Fix | Delete
*/
[34] Fix | Delete
public function update( $value ) {
[35] Fix | Delete
global $custom_image_header;
[36] Fix | Delete
[37] Fix | Delete
// If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin().
[38] Fix | Delete
if ( empty( $custom_image_header ) ) {
[39] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php';
[40] Fix | Delete
$args = get_theme_support( 'custom-header' );
[41] Fix | Delete
$admin_head_callback = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null;
[42] Fix | Delete
$admin_preview_callback = isset( $args[0]['admin-preview-callback'] ) ? $args[0]['admin-preview-callback'] : null;
[43] Fix | Delete
$custom_image_header = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback );
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
/*
[47] Fix | Delete
* If the value doesn't exist (removed or random),
[48] Fix | Delete
* use the header_image value.
[49] Fix | Delete
*/
[50] Fix | Delete
if ( ! $value ) {
[51] Fix | Delete
$value = $this->manager->get_setting( 'header_image' )->post_value();
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
if ( is_array( $value ) && isset( $value['choice'] ) ) {
[55] Fix | Delete
$custom_image_header->set_header_image( $value['choice'] );
[56] Fix | Delete
} else {
[57] Fix | Delete
$custom_image_header->set_header_image( $value );
[58] Fix | Delete
}
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function