: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Customize API: WP_Customize_Background_Image_Control class
* Customize Background Image Control class.
* @see WP_Customize_Image_Control
class WP_Customize_Background_Image_Control extends WP_Customize_Image_Control {
* Customize control type.
public $type = 'background';
* @uses WP_Customize_Image_Control::__construct()
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
public function __construct( $manager ) {
'label' => __( 'Background Image' ),
'section' => 'background_image',
* Enqueue control related scripts/styles.
public function enqueue() {
$custom_background = get_theme_support( 'custom-background' );
'_wpCustomizeBackground',
'defaults' => ! empty( $custom_background[0] ) ? $custom_background[0] : array(),
'add' => wp_create_nonce( 'background-add' ),