Your IP : 216.73.216.95


Current Path : /var/test/www/html/37thanniversary/wp-content/themes/crowdngo/give/loop/
Upload File :
Current File : /var/test/www/html/37thanniversary/wp-content/themes/crowdngo/give/loop/list-small.php

<?php
global $post;
?>
<article class="post-give give-default give-list">	
	<div class="give-image">
		<?php give_get_template_part( 'single-give-form/featured-image3' ); ?>
	</div>
	<div class="give-content">
		<div class="give-content">
	        <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>

	        <div class="donate-wrapper">
        		<?php
        		
                $form = new Give_Donate_Form( $post->ID );
                $form_id = $post->ID;
                $goal_progress_stats = give_goal_progress_stats( $form );

                $income = $goal_progress_stats['raw_actual'];
                $goal   = $goal_progress_stats['raw_goal'];

                $progress = $goal ? round( ( ($goal - $income) / $goal ) * 100, 2 ) : 100;

                $form_currency = apply_filters( 'give_goal_form_currency', give_get_currency( $form_id ), $form_id );

                $income_format_args = apply_filters( 'give_goal_income_format_args', array(
                    'sanitize' => false,
                    'currency' => $form_currency,
                    'decimal'  => false,
                ), $form_id );

                /**
                 * Filter the goal formatting arguments.
                 *
                 * @since 1.8.17
                 */
                $goal_format_args = apply_filters( 'give_goal_amount_format_args', array(
                    'sanitize' => false,
                    'currency' => $form_currency,
                    'decimal'  => false,
                ), $form_id );

                $income = give_human_format_large_amount( give_format_amount( $income, $income_format_args ), array( 'currency' => $form_currency ) );
                $goal   = give_human_format_large_amount( give_format_amount( $goal, $goal_format_args ), array( 'currency' => $form_currency ) );

                ?>
                <span class="donation-raised">
                    <span class="value"><?php echo give_currency_filter( $income, array( 'form_id' => $form_id ) ); ?></span>
                    <span class="text"><?php esc_html_e('Raised', 'crowdngo'); ?></span>
                </span>/
                <span class="donation-goal">
                    <span class="text"><?php esc_html_e('Goal:', 'crowdngo'); ?></span>
                    <span class="value">
                        <?php
                        if ( $goal ) {
                            echo give_currency_filter( $goal, array( 'form_id' => $form_id ) );
                        } else {
                            esc_html_e('unlimited', 'crowdngo');
                        }
                        ?>
                    </span>
                </span>
	        </div>

		</div>
	</div>	
</article>