<?php
/**
 * Sample implementation of the Custom Header feature
 *
 * @link https://developer.wordpress.org/themes/functionality/custom-headers/
 *
 * @package florist_bouquet
 */

function florist_bouquet_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'florist_bouquet_custom_header_args', array(
		'default-text-color'     => 'fff',
		'header-text' 			 =>	false,
		'width'                  => 1360,
		'height'                 => 110,
		'flex-width'         	=> true,
        'flex-height'        	=> true,
		'wp-head-callback'       => 'florist_bouquet_header_style',
	) ) );
}

add_action( 'after_setup_theme', 'florist_bouquet_custom_header_setup' );

if ( ! function_exists( 'florist_bouquet_header_style' ) ) :

add_action( 'wp_enqueue_scripts', 'florist_bouquet_header_style' );
function florist_bouquet_header_style() {
	if ( get_header_image() ) :
	$florist_bouquet_custom_css = "
        .bottom-header-outer-wrapper{
			background-image:url('".esc_url(get_header_image())."') !important;
			background-position: center top;
		}";
	   	wp_add_inline_style( 'florist-bouquet-style', $florist_bouquet_custom_css );
	endif;
}
endif;