| Server IP : 104.21.28.229 / Your IP : 216.73.216.95 Web Server : Apache/2 System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mienphi ( 1014) PHP Version : 8.2.14 Disable Function : 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 MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mienphi/domains/mienphi.org/public_html/wp-content/themes/consultstreet/inc/ |
Upload File : |
<?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 consultstreet
*/
/**
* Set up the WordPress core custom header feature.
*
* @uses consultstreet_header_style()
*/
function consultstreet_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'consultstreet_custom_header_args', array(
'default-image' => get_stylesheet_directory_uri() . '/assets/img/page-header-bg.jpg',
'default-text-color' => '#fff',
'width' => 1920,
'height' => 500,
'flex-height' => true,
'flex-width' => true,
'wp-head-callback' => 'consultstreet_header_style',
) ) );
}
add_action( 'after_setup_theme', 'consultstreet_custom_header_setup' );
if ( ! function_exists( 'consultstreet_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog.
*
* @see consultstreet_custom_header_setup().
*/
function consultstreet_header_style() {
$header_text_color = get_header_textcolor();
/*
* If no custom options for text are set, let's bail.
* get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ).
*/
if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
return;
}
// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css">
<?php
// Has the text been hidden?
if ( ! display_header_text() ) :
?>
.site-title,
.site-description {
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that.
else :
?>
.site-title a,
.site-description {
color: #<?php echo esc_attr( $header_text_color ); ?>;
}
.navbar-header-wrap.not-sticky .site-branding-text .site-title a,
.navbar-header-wrap.not-sticky .site-branding-text .site-description{color: #<?php echo esc_attr( $header_text_color ); ?>;}
<?php endif; ?>
</style>
<?php
}
endif;