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/grid.php

<?php
global $post;
?>
<article class="post-give give-grid give-default">
    <div class="give-grid-container">
        <div class="give-image">
            <?php give_get_template_part( 'single-give-form/featured-image1' ); ?>
        </div>
        <div class="give-content">
            
            <?php give_show_goal_progress( get_the_ID(), array('version' => 'v1') ); ?>

            <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>
            <?php crowdngo_give_display_sales(); ?>
            <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
            <a class="btn btn-donate" href="<?php the_permalink(); ?>"><?php esc_html_e('Donation', 'crowdngo' ); ?></a>
        </div>
    </div>
</article>