HEX
Server: Apache
System: Linux hp3-wp-1011494.hostingp3.local 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User: csh2729955 (2121743)
PHP: 7.4.33
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: /home/storage/162/3480162/user/htdocs/wp-content/themes/colormag/inc/custom-header.php
<?php
/**
 * Implements a custom header for ColorMag.
 *
 * See http://codex.wordpress.org/Custom_Headers
 *
 * @package    ThemeGrill
 * @subpackage ColorMag
 * @since      ColorMag 1.0
 */

/**
 * Setup the WordPress core custom header feature.
 */
function colormag_custom_header_setup() {

	add_theme_support(
		'custom-header',
		apply_filters(
			'colormag_custom_header_args',
			array(
				'default-image'          => '',
				'header-text'            => '',
				'default-text-color'     => '',
				'width'                  => 1400,
				'height'                 => 400,
				'flex-width'             => true,
				'flex-height'            => true,
				'wp-head-callback'       => '',
				'admin-head-callback'    => '',
				'video'                  => true,
				'admin-preview-callback' => 'colormag_admin_header_image',
			)
		)
	);

}

add_action( 'after_setup_theme', 'colormag_custom_header_setup' );

if ( ! function_exists( 'colormag_admin_header_image' ) ) :

	/**
	 * Custom header image markup displayed on the Appearance > Header admin panel.
	 */
	function colormag_admin_header_image() {
		?>
		<div id="headimg">
			<?php
			if ( function_exists( 'the_custom_header_markup' ) ) {
				the_custom_header_markup();
			} else {
				if ( get_header_image() ) :
					?>
					<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>">
					<?php
				endif;
			}
			?>
		</div>
		<?php
	}

endif;