<?php
$bosa_political_party_fact_one_title     = get_theme_mod( 'bosa_political_party_fact_one_title', '' );
$bosa_political_party_fact_one_content   = get_theme_mod( 'bosa_political_party_fact_one_content', '' );

$bosa_political_party_fact_two_title 	 = get_theme_mod( 'bosa_political_party_fact_two_title', '' );
$bosa_political_party_fact_two_content   = get_theme_mod( 'bosa_political_party_fact_two_content', '' );

$bosa_political_party_fact_three_title   = get_theme_mod( 'bosa_political_party_fact_three_title', '' );
$bosa_political_party_fact_three_content = get_theme_mod( 'bosa_political_party_fact_three_content', '' );

$bosa_political_party_fact_four_title    = get_theme_mod( 'bosa_political_party_fact_four_title', '' );
$bosa_political_party_fact_four_content  = get_theme_mod( 'bosa_political_party_fact_four_content', '' );

$bosa_political_party_fact_five_title    = get_theme_mod( 'bosa_political_party_fact_five_title', '' );
$bosa_political_party_fact_five_content  = get_theme_mod( 'bosa_political_party_fact_five_content', '' );


$bosa_political_party_fact_array = array();
$bosa_political_party_has_fact = false;
if( !empty( $bosa_political_party_fact_one_title) || !empty($bosa_political_party_fact_one_content ) ){
	$bosa_political_party_has_fact = true;
	$bosa_political_party_fact_array['fact_one'] = array(
		'title' => $bosa_political_party_fact_one_title,
		'content' => $bosa_political_party_fact_one_content,
	);
}
if( !empty($bosa_political_party_fact_two_title) || !empty($bosa_political_party_fact_two_content ) ){
	$bosa_political_party_has_fact = true;
	$bosa_political_party_fact_array['fact_two'] = array(
		'title' => $bosa_political_party_fact_two_title,
		'content' => $bosa_political_party_fact_two_content,
	);
}
if( !empty( $bosa_political_party_fact_three_title) || !empty($bosa_political_party_fact_three_content) ){
	$bosa_political_party_has_fact = true;
	$bosa_political_party_fact_array['fact_three'] = array(
		'title' => $bosa_political_party_fact_three_title,
		'content' => $bosa_political_party_fact_three_content,
	);
}
if( !empty( $bosa_political_party_fact_four_title) || !empty($bosa_political_party_fact_four_content) ){
	$bosa_political_party_has_fact = true;
	$bosa_political_party_fact_array['fact_four'] = array(
		'title' => $bosa_political_party_fact_four_title,
		'content' => $bosa_political_party_fact_four_content,
	);
}
if( !empty( $bosa_political_party_fact_five_title) || !empty($bosa_political_party_fact_five_content) ){
	$bosa_political_party_has_fact = true;
	$bosa_political_party_fact_array['fact_five'] = array(
		'title' => $bosa_political_party_fact_five_title,
		'content' => $bosa_political_party_fact_five_content,
	);
}

if( !get_theme_mod( 'bosa_political_party_disable_fun_facts_section', true ) && $bosa_political_party_has_fact ){ ?>
	<section class="section-fun-facts-area">
		<div class="content-wrap">
			<div class="row justify-content-center">
				<?php foreach( $bosa_political_party_fact_array as $bosa_political_party_each_fact ){ ?>
					<div class="col-sm-6 col-md-4 col-lg-3">
						<article class="fact-content-wrap">					
							<div class="entry-content">
								<header class="entry-header">
									<h3 class="entry-title">
										<?php echo esc_html( $bosa_political_party_each_fact['title'] ); ?>
									</h3>
									<p>
									<?php echo esc_html( $bosa_political_party_each_fact['content'] ); ?>
									</p>
								</header>
							</div>
						</article>
					</div>
				<?php } ?>
			</div>
		</div>
	</section>
<?php } 