<?php
/**
 * @package 	WordPress
 * @subpackage 	Welfare
 * @version		1.0.4
 * 
 * Campaigns Page Vertical Campaign Format Template
 * Created by CMSMasters
 * 
 */


global $cmsms_featured_campaign_metadata;

$cmsms_metadata = explode(',', $cmsms_featured_campaign_metadata);

$image = in_array('image', $cmsms_metadata) ? true : false;
$link = in_array('link', $cmsms_metadata) ? true : false;
$rest_amount = in_array('rest_amount', $cmsms_metadata) ? true : false;
$donated_percent = in_array('donated_percent', $cmsms_metadata) ? true : false;
$excerpt = in_array('excerpt', $cmsms_metadata) ? true : false;
$donation_but = in_array('donation_but', $cmsms_metadata) ? true : false;


global $post;

$camp = $post;
?>

<!--_________________________ Start Vertical Campaign _________________________ -->

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<?php 
	if ($image) {
		echo '<div class="cmsms_campaign_wrap_img">';
			cmsms_thumb_rollover($camp->ID, 'project-thumb', false, $link, false, false, false, false, false, false, true, false, false);
		echo '</div>';
	}
	
	
	if ($donated_percent) {
		cmsms_campaign_donated($camp->ID, 'page', 'vertical');
	}
	?>
	<div class="cmsms_campaign_cont">
		<div class="cmsms_campaign_wrap_heading">
			<?php 
			if ($rest_amount) {
				cmsms_campaign_rest_amount($camp->ID);
			}
			
			cmsms_campaign_heading($camp->ID, 'h2', $link);
			?>
		</div>
		<?php
		if ($excerpt) {
			if ($camp->post_excerpt != '') {
				$cmsms_content = $camp->post_excerpt;
			} else {
				$cmsms_content = $camp->post_content;
			}
			
			
			cmsms_campaign_exc_cont($cmsms_content);
		}
		
		
		if ($donation_but) {
			cmsms_campaign_donate_button($camp->ID);
		}
		?>
	</div>
</article>
<!--_________________________ Finish Vertical Campaign _________________________ -->

