<commit_before><?php
// get page thumbnail image if it is a page
$bg_url = '';
if ( is_home() ) {
    $bg     = mbtheme_get_option( 'header-bg-blog', array() );
    $bg_url = $bg[ 'url' ];
} elseif ( is_page() ) {
    $page_id = get_queried_object_id();
    $bg_url  = get_the_post_thumbnail_url( $page_id, 'full' );
}

// get default backgound image
if ( !$bg_url ) {
    $bg     = mbtheme_get_option( 'header-bg-default', array() );
    $bg_url = $bg[ 'url' ];
}

// set bg style
$bg_style = ($bg_url) ? 'background-image: url("' . esc_url( $bg_url ) . '")' : '';
?>
<div class="site-header" style="<?php echo esc_attr( $bg_style ); ?>">
    <div class="site-header-inner">
        <?php do_action( 'mbtheme_site_header_inner' ); ?>
    </div><commit_msg>Header background form single blog<commit_after><?php
// get page thumbnail image if it is a page
$page_id = get_queried_object_id(); 
$bg_url = '';
if ( is_singular( 'post' ) ) {
	$bg		 = mbtheme_get_option( 'header-bg-blog', array() );
	$bg_url	 = $bg[ 'url' ];
} elseif ( (is_home() || is_page()) && $page_id ) {
	$bg_url	 = get_the_post_thumbnail_url( $page_id, 'full' );
}

// get default backgound image
if ( !$bg_url ) {
	$bg		 = mbtheme_get_option( 'header-bg-default', array() );
	$bg_url	 = $bg[ 'url' ];
}

// set bg style
$bg_style = ($bg_url) ? 'background-image: url("' . esc_url( $bg_url ) . '")' : '';
?>
<div class="site-header" style="<?php echo esc_attr( $bg_style ); ?>">
    <div class="site-header-inner">
		<?php do_action( 'mbtheme_site_header_inner' ); ?>
    </div>
{'fraction_non_alphanumeric': 0.20219638242894056, 'fraction_numerical': 0.0, 'mean_word_length': 3.766153846153846, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4643071', 'n_tokens_mistral': 611, 'n_tokens_neox': 612, 'n_words': 130}