HEX
Server: Apache/2
System: Linux vpslll9m.sdns.vn 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User: thuexe247c (1044)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/thuexe247c/public_html/wp-content/themes/flex-multi-business/inc/custom-header.php
<?php
/**
 * Sample implementation of the Custom Header feature
 *
 * You can add an optional custom header image to header.php like so ...
 *
	<?php the_header_image_tag(); ?>
 *
 * @link https://developer.wordpress.org/themes/functionality/custom-headers/
 *
 * @package flex-multi-business
 */

/**
 * Set up the WordPress core custom header feature.
 *
 * @uses flex_multi_business_header_style()
 */
function flex_multi_business_custom_header_setup() {
	add_theme_support(
		'custom-header',
		apply_filters(
			'flex_multi_business_custom_header_args',
			array(
				'default-image'      => '',
				'default-text-color' => '000000',
				'width'              => 1000,
				'height'             => 250,
				'flex-height'        => true,
				'wp-head-callback'   => 'flex_multi_business_header_style',
			)
		)
	);
}
add_action( 'after_setup_theme', 'flex_multi_business_custom_header_setup' );

if ( ! function_exists( 'flex_multi_business_header_style' ) ) :
	/**
	 * Styles the header image and text displayed on the blog
	 *
	 * @see flex_multi_business_custom_header_setup().
	 */
	add_action( 'wp_enqueue_scripts', 'flex_multi_business_header_style' );
	
	function flex_multi_business_header_style() {
		$flex_multi_business_header_image = get_header_image() ? get_header_image() : get_template_directory_uri() . '/assets/img/header-img.png';
		$flex_multi_business_custom_css = "
			.box-image .single-page-img{
				background-image: url('" . esc_url($flex_multi_business_header_image) . "');
				background-repeat: no-repeat;
				background-position: center center;
				background-size: cover !important;
				height: 300px;
			}";
			   wp_add_inline_style( 'flex-multi-business-style', $flex_multi_business_custom_css );
	}
	endif;