| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | * @author WP Charitable LLC |
| 8 | 8 | * @package Charitable/Templates/Campaign |
| 9 | 9 | * @since 1.0.0 |
| 10 | 10 | * @version 1.5.7 |
| 11 | + * @version 1.8.8.6 | |
| 11 | 12 | */ |
| 12 | 13 | |
| 13 | 14 | // Exit if accessed directly. |
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -14,16 +15,16 @@ | ||
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | 16 | exit; |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | -$campaigns = $view_args['campaigns']; | |
| 19 | +$charitable_campaigns = $view_args['campaigns']; | |
| 19 | 20 | |
| 20 | -if ( ! $campaigns->have_posts() ) : | |
| 21 | +if ( ! $charitable_campaigns->have_posts() ) : | |
| 21 | 22 | return; |
| 22 | 23 | endif; |
| 23 | 24 | |
| 24 | -$loop_class = charitable_campaign_loop_class( $view_args ); | |
| 25 | -$args = charitable_campaign_loop_args( $view_args ); | |
| 25 | +$charitable_loop_class = charitable_campaign_loop_class( $view_args ); | |
| 26 | +$charitable_args = charitable_campaign_loop_args( $view_args ); | |
| 26 | 27 | |
| 27 | 28 | /** |
| 28 | 29 | * Add something before the campaign loop. |
| 29 | 30 | * |
| @@ -31,19 +32,19 @@ | ||
| 31 | 32 | * |
| 32 | 33 | * @param WP_Query $campaigns The campaigns. |
| 33 | 34 | * @param array $args Loop args. |
| 34 | 35 | */ |
| 35 | -do_action( 'charitable_campaign_loop_before', $campaigns, $args ); | |
| 36 | +do_action( 'charitable_campaign_loop_before', $charitable_campaigns, $charitable_args ); | |
| 36 | 37 | |
| 37 | 38 | ?> |
| 38 | -<ol class="<?php echo esc_attr( $loop_class ); ?>"> | |
| 39 | +<ol class="<?php echo esc_attr( $charitable_loop_class ); ?>"> | |
| 39 | 40 | |
| 40 | 41 | <?php |
| 41 | -while ( $campaigns->have_posts() ) : | |
| 42 | +while ( $charitable_campaigns->have_posts() ) : | |
| 42 | 43 | |
| 43 | - $campaigns->the_post(); | |
| 44 | + $charitable_campaigns->the_post(); | |
| 44 | 45 | |
| 45 | - charitable_template( 'campaign-loop/campaign.php', $args ); | |
| 46 | + charitable_template( 'campaign-loop/campaign.php', $charitable_args ); | |
| 46 | 47 | |
| 47 | 48 | endwhile; |
| 48 | 49 | |
| 49 | 50 | wp_reset_postdata(); |
| @@ -58,5 +59,5 @@ | ||
| 58 | 59 | * |
| 59 | 60 | * @param WP_Query $campaigns The campaigns. |
| 60 | 61 | * @param array $args Loop args. |
| 61 | 62 | */ |
| 62 | -do_action( 'charitable_campaign_loop_after', $campaigns, $args ); | |
| 63 | +do_action( 'charitable_campaign_loop_after', $charitable_campaigns, $charitable_args ); | |