<?php
/**
 * The template for displaying the front page.
 *
 * @package Sunset
 */

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

get_header(); ?>

<?php
/**
 * sunset_before_site_main hook.
 */
do_action( 'sunset_before_site_main' );
?>

	<main class="site-main">

		<?php
		/**
		 * sunset_before_main_content hook.
		 *
		 * @hooked sunset_heading_title - 5
		 * @hooked sunset_before_content_tags - 10
		 */
		do_action( 'sunset_before_main_content', 'page' );

		if ( have_posts() ) :

			/**
			 * sunset_before_loop hook.
			 * @hooked sunset_loop_opening_tags - 10
			 */
			do_action( 'sunset_before_loop', 'page' );

			while ( have_posts() ) :

				the_post();
				
				the_content();

				wp_link_pages(
					array(
						'before' => '<div class="page-links">' . __( 'Pages:', 'my-sunset' ),
						'after'  => '</div>',
					)
				);

			endwhile;

			/**
			 * sunset_after_loop hook.
			 * 
			 * @hooked sunset_content_closing_tags - 50
			 * 
			 */
			do_action( 'sunset_after_loop', 'page' );

		else :

			get_template_part( 'none' );

		endif;

		/**
		 * sunset_after_main_content hook.
		 * 
		 * @hooked sunset_after_content_tags - 10
		 */
		do_action( 'sunset_after_main_content' );
		?>

	</main>

<?php
/**
 * sunset_after_site_main hook.
 */
do_action( 'sunset_after_site_main' );

get_footer();

?>