Beispiel #1
0
/**
 * A helper function to determine whether the current post should have the meta displayed.
 *
 * @param   WP_Post $post Optional. If a post is not passed, the current $post object will be used.
 * @return  boolean
 * @since   1.0.0
 */
function reach_hide_post_meta($post = '')
{
    if (!strlen($post)) {
        global $post;
    }
    if (reach_has_edd() && edd_is_checkout()) {
        return true;
    }
    if (function_exists('hide_meta_start')) {
        return get_post_meta($post->ID, '_hide_meta', true);
    } else {
        return get_post_meta($post->ID, '_reach_hide_post_meta', true);
    }
}
Beispiel #2
0
<?php

/**
 * Checkout page template.
 *
 * This template is only used if Easy Digital Downloads is active.
 *
 * @package Reach
 */
if (!reach_has_edd()) {
    return;
}
if (class_exists('Charitable_EDD_Cart')) {
    $cart = new Charitable_EDD_Cart(edd_get_cart_contents(), edd_get_cart_fees('item'));
    $campaigns = $cart->get_benefits_by_campaign();
} else {
    $campaigns = array();
}
get_header('stripped');
?>
    
<main id="main" class="site-main site-content cf">  
	<div class="layout-wrapper">    
		<div id="primary" class="content-area <?php 
if (empty($campaigns)) {
    ?>
no-sidebar<?php 
}
?>
">      
		<?php