<?php

/**
 * Template part for displaying Page Header
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package ostech
 */
?>
<?php
$ostech_page_header_extra_class = apply_filters('ostech_page_header_extra_class', 'page-header--unit-test');
?>
<section class="page-header <?php echo esc_attr($ostech_page_header_extra_class); ?>">
	<div class="page-header__bg"></div>
	<div class="container">
		<?php
		$ostech_page_title_text = !empty(get_post_meta(get_the_ID(), 'ostech_set_header_title', true)) ? get_post_meta(get_the_ID(), 'ostech_set_header_title', true) : get_the_title();
		$ostech_page_header_tag = apply_filters('ostech_page_header_tag', 'h2');
		?>
		<<?php echo esc_attr($ostech_page_header_tag); ?> class="page-header__title">
			<?php if (!is_page()) : ?>
				<?php ostech_page_title(); ?>
			<?php else : ?>
				<?php echo wp_kses($ostech_page_title_text, 'ostech_allowed_tags') ?>
			<?php endif; ?>
		</<?php echo esc_attr($ostech_page_header_tag); ?>><!-- /.page-title -->
		<?php $ostech_page_meta_breadcumb_status = empty(get_post_meta(get_the_ID(), 'ostech_show_page_breadcrumb', true)) ? 'on' : get_post_meta(get_the_ID(), 'ostech_show_page_breadcrumb', true); ?>
		<?php if (function_exists('bcn_display_list') && 'yes' == get_theme_mod('breadcrumb_opt', 'off') && 'on' == $ostech_page_meta_breadcumb_status) : ?>
			<ul class="ostech-breadcrumb list-unstyled">
				<?php bcn_display_list(); ?>
			</ul><!-- /.thm-breadcrumb list-unstyled -->
		<?php endif; ?>
	</div>
</section>