<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Ogma
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?> <?php ogma_schema_markup( 'html' ); ?>>
<?php
	wp_body_open();

	/**
	 * hook - ogma_before_page
	 *
	 * @since 1.0.0
	 */
	do_action( 'ogma_before_page' );
?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'ogma' ); ?></a>

	<?php
		/**
		 * hook - ogma_header_section
		 *
		 * @hooked - ogma_custom_header_html - 10
		 * @hooked - ogma_top_header - 20
		 * @hooked - ogma_main_header - 30
		 * @hooked - header_news_ticker_section - 40
		 *
		 * @since 1.0.0
		 */
		do_action( 'ogma_header_section' );
	?>

	<div id="content" class="site-content" <?php ogma_schema_markup( 'creative_work' ); ?>>

		<?php

			if ( is_home() && is_front_page() ) {

				$frontpage_blocks_enable = ogma_get_customizer_option_value( 'frontpage_blocks_enable' );

				if ( true !== $frontpage_blocks_enable ) {
					return;
				}

				/**
				 * hook - ogma_frontpage_section
				 *
				 * @hooked - ogma_frontpage_main_banner - 10
				 * @hooked - ogma_frontpage_top_fullwidth - 20
				 * @hooked - ogma_frontpage_middle_content - 30
				 * @hooked - ogma_frontpage_bottom_fullwidth - 40
				 *
				 * @since 1.0.0
				 */
				do_action( 'ogma_frontpage_section' );

			}

		?>
