<?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 Theme Palace
	 * @subpackage Mezze
	 * @since Mezze 1.0.0
	 */

	/**
	 * mezze_doctype hook
	 *
	 * @hooked mezze_doctype -  10
	 *
	 */
	do_action( 'mezze_doctype' );

?>
<head>
<?php
	/**
	 * mezze_before_wp_head hook
	 *
	 * @hooked mezze_head -  10
	 *
	 */
	do_action( 'mezze_before_wp_head' );

	wp_head(); 
?>
</head>

<body <?php body_class(); ?>>
<?php do_action( 'wp_body_open' ); ?>

<?php
	/**
	 * mezze_page_start_action hook
	 *
	 * @hooked mezze_page_start -  10
	 *
	 */
	do_action( 'mezze_page_start_action' ); 

	/**
	 * mezze_loader_action hook
	 *
	 * @hooked mezze_loader -  10
	 *
	 */
	do_action( 'mezze_before_header' );

	/**
	 * mezze_header_action hook
	 *
	 * @hooked mezze_header_start -  10
	 * @hooked mezze_site_branding -  20
	 * @hooked mezze_site_navigation -  30
	 * @hooked mezze_header_end -  50
	 *
	 */
	do_action( 'mezze_header_action' );

	/**
	 * mezze_content_start_action hook
	 *
	 * @hooked mezze_content_start -  10
	 *
	 */
	do_action( 'mezze_content_start_action' );

	/**
	 * mezze_header_image_action hook
	 *
	 * @hooked mezze_header_image -  10
	 *
	 */
	do_action( 'mezze_header_image_action' );

    if ( mezze_is_frontpage() ) {
    	$i=1;
    	$sections = mezze_sortable_sections();
		foreach ( $sections as $section => $value ) {
			add_action( 'mezze_primary_content', 'mezze_add_'. $section .'_section', $i . 0 );
			$i++;
		}
		do_action( 'mezze_primary_content' );
	}