function sf_campaign_sidebar() { global $post; $campaign = new ATCF_Campaign($post->ID); $download_id = $post->ID; $prices = edd_get_variable_prices($download_id); $type = edd_single_price_option_mode($download_id) ? 'checkbox' : 'radio'; $extra_class = ""; if ($campaign->is_donations_only()) { $extra_class = 'project-donate-only'; } ?> <div id="back-this-project" class="campaign-sidebar <?php echo esc_attr($extra_class); ?> col-sm-4"> <?php if ($campaign->is_active()) { if ($campaign->is_donations_only()) { echo '<p class="donate-only">' . __('This project is donation only, and you can donate using the button below.', 'swiftframework') . '</p>'; echo edd_get_purchase_link(array('download_id' => $post->ID, 'class' => 'accent sf-button contribute-now', 'price' => false, 'text' => __('Donate Now', 'swiftframework'))); } else { echo edd_get_purchase_link(array('download_id' => $post->ID, 'class' => 'accent sf-button contribute-now', 'price' => false, 'text' => __('Contribute Now', 'swiftframework'))); } } else { // Inactive, just show options with no button if ($campaign->is_donations_only()) { echo '<p class="project-ended">' . __('This project has ended.', 'swiftframework') . '</p>'; } else { atcf_campaign_contribute_options($prices, $type, $download_id); } } ?> </div> <?php }
//bumbum ?> <?php //locate_template( array( 'campaign/author-info.php' ), true ); //bumbum ?> <div id="contribute-now" class="single-reward-levels"> <?php if ($campaign->is_active()) { echo edd_get_purchase_link(array('download_id' => $post->ID, 'class' => '', 'price' => false, 'text' => __('Contribute Now', 'fundify'))); } else { // Inactive, just show options with no button atcf_campaign_contribute_options(edd_get_variable_prices($post->ID), 'checkbox', $post->ID); } ?> </div> <?php locate_template(array('campaign/author-info.php'), true); //bumbum ?> <div class="widget-area" role="complementary"> <div class="sidebar-widgets"> <?php dynamic_sidebar(1); ?>