Advertisement
rejuancse

fund-raised

Oct 5th, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.08 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', 'backer') ?></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', 'backer') ?></span>
  16.         </li>
  17.         <?php if ($wpneo_campaign_end_method != 'never_end'){
  18.             ?>
  19.             <li>
  20.                 <?php if (WPNEOCF()->is_campaign_started()){ ?>
  21.                     <p class="funding-amount"><?php echo WPNEOCF()->dateRemaining(); ?></p>
  22.                     <span class="info-text"><?php _e( 'Days to go','backer' ); ?></span>
  23.                 <?php }else{ ?>
  24.                     <p class="funding-amount"><?php echo WPNEOCF()->days_until_launch(); ?></p>
  25.                     <span class="info-text"><?php _e( 'Days Until Launch','backer' ); ?></span>
  26.                 <?php } ?>
  27.             </li>
  28.         <?php } ?>
  29.  
  30.         <li>
  31.             <?php
  32.                 if ($wpneo_campaign_end_method == 'target_goal') {
  33.                     $method = __('Target Goal', 'backer');
  34.                 }else if($wpneo_campaign_end_method == 'target_date') {
  35.                     $method = __('Target Date', 'backer');
  36.                 }else if($wpneo_campaign_end_method == 'target_goal_and_date') {
  37.                     $method = __('Goal and Date', 'backer');
  38.                 }else {
  39.                     $method = __('Campaign Never Ends', 'backer');
  40.                 }
  41.              ?>
  42.  
  43.             <p class="funding-amount"><?php echo $method; ?></p>
  44.             <span class="info-text"><?php _e('Campaign End Method', 'wp-crowdfunding') ?></span>
  45.  
  46.         </li>
  47.     </ul>
  48. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement