Advertisement
rejuancse

fund-raised

Sep 18th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3.     exit; // Exit if accessed directly
  4. }
  5. $wpneo_campaign_end_method = get_post_meta(get_the_ID(), 'wpneo_campaign_end_method', true);
  6. ?>
  7.  
  8. <div class="campaign-funding-info">
  9.     <ul>
  10.         <li><p class="funding-amount"><?php echo wpneo_crowdfunding_price(wpneo_crowdfunding_get_total_goal_by_campaign(get_the_ID())); ?></p>
  11.             <span class="info-text"><?php _e('Funding Goal', 'wp-crowdfunding') ?></span>
  12.         </li>
  13.         <li>
  14.             <p class="funding-amount"><?php echo wpneo_crowdfunding_price(wpneo_crowdfunding_get_total_fund_raised_by_campaign()); ?></p>
  15.             <span class="info-text"><?php _e('Funds Raised', 'wp-crowdfunding') ?></span>
  16.         </li>
  17.         <?php if ($wpneo_campaign_end_method != 'never_end'){
  18.             ?>
  19.             <li>
  20.  
  21.                 <?php if (WPNEOCF()->is_campaign_started()){ ?>
  22.                     <p class="funding-amount"><?php echo WPNEOCF()->dateRemaining(); ?></p>
  23.                     <span class="info-text"><?php _e( 'Days to go','wp-crowdfunding' ); ?></span>
  24.                 <?php }else{ ?>
  25.                     <p class="funding-amount"><?php echo WPNEOCF()->days_until_launch(); ?></p>
  26.                     <span class="info-text"><?php _e( 'Days Until Launch','wp-crowdfunding' ); ?></span>
  27.                 <?php } ?>
  28.  
  29.             </li>
  30.         <?php } ?>
  31.  
  32.         <li>
  33.             <?php $method =  (($wpneo_campaign_end_method == 'target_goal') ? 'Target Goal' : (($wpneo_campaign_end_method == 'target_date') ? 'Target Date' : (($wpneo_campaign_end_method == 'target_goal_and_date') ? 'Goal and Date' : 'Campaign Never Ends'))); ?>
  34.             <p class="funding-amount"><?php echo $method; ?></p>
  35.             <span class="info-text"><?php _e('Campaign End Method', 'wp-crowdfunding') ?></span>
  36.  
  37.         </li>
  38.     </ul>
  39. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement