<?php

	global $post_id, $is_default_phc, $default_phc_title, $default_phc_description;
	
	# Page Head Caption
	#$post_id = get_the_ID();


	if($post_id || is_category() || is_tag() || is_author()):
		
		# PHC Details
		$phc_title 			= get_post_meta($post_id, 'phc_title', TRUE);
		$phc_description 	= get_post_meta($post_id, 'phc_description', TRUE);
		$phc_visible 		= get_post_meta($post_id, 'phc_visible', TRUE);
		$phc_custom_content = get_post_meta($post_id, 'phc_custom_content', TRUE);
		
		
		
		if($phc_visible == 0)
		{
			$phc_visible = get_option('kolor_pagehead_captions_enable') == 'true' ? 1 : -1;
		}

		if($phc_visible != -1 && ($is_default_phc || $phc_custom_content != 1))
		{
			if( ! isset($default_phc_title) || ! isset($default_phc_description))
			{					
				$default_phc_title = get_option('kolor_pagehead_captions_title');
				$default_phc_description = get_option('kolor_pagehead_captions_description');
			}
			
			$phc_title = $default_phc_title;
			$phc_description = $default_phc_description;
			
			$phc_visible = 1;
		}
		
		
		if($phc_visible == 1):
?>
<div class="container">
	<!-- content page title -->
	<div class="sixteen columns content_page_title">

		<h1><?php echo $phc_title; ?></h1>
		<?php echo do_shortcode(wpautop($phc_description)); ?>
		
	</div>
	<!-- end: content page title -->
</div>
<?php 
		endif;
		
	endif; 
?>