<?php

// Disable direct call
if ( ! defined( 'ABSPATH' ) ) { exit; }


/* Theme setup section
-------------------------------------------------------------------- */

if ( !function_exists( 'healthcoach_template_no_articles_theme_setup' ) ) {
	add_action( 'healthcoach_action_before_init_theme', 'healthcoach_template_no_articles_theme_setup', 1 );
	function healthcoach_template_no_articles_theme_setup() {
		healthcoach_add_template(array(
			'layout' => 'no-articles',
			'mode'   => 'internal',
			'title'  => esc_html__('No articles found', 'healthcoach')
		));
	}
}

// Template output
if ( !function_exists( 'healthcoach_template_no_articles_output' ) ) {
	function healthcoach_template_no_articles_output($post_options, $post_data) {
		?>
		<article class="post_item">
			<div class="post_content">
				<h2 class="post_title"><?php esc_html_e('No posts found', 'healthcoach'); ?></h2>
				<p><?php esc_html_e( 'Sorry, but nothing matched your search criteria.', 'healthcoach' ); ?></p>
				<p><?php echo wp_kses_data( sprintf(__('Go back, or return to <a href="%s">%s</a> home page to choose a new page.', 'healthcoach'), esc_url(home_url('/')), get_bloginfo()) ); ?>
				<br><?php esc_html_e('Please report any broken links to our team.', 'healthcoach'); ?></p>
				<?php healthcoach_show_layout(healthcoach_sc_search(array('state'=>"fixed"))); ?>
			</div>	<!-- /.post_content -->
		</article>	<!-- /.post_item -->
		<?php
	}
}
?>