| @@ -3,25 +3,28 @@ | ||
| 3 | 3 | * Displays the campaign loop. |
| 4 | 4 | * |
| 5 | 5 | * Override this template by copying it to yourtheme/charitable/campaign-loop.php |
| 6 | 6 | * |
| 7 | - * @author Studio 164a | |
| 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 | -if ( ! defined( 'ABSPATH' ) ) { exit; } | |
| 15 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | + exit; | |
| 17 | +} | |
| 15 | 18 | |
| 16 | -$campaigns = $view_args['campaigns']; | |
| 19 | +$charitable_campaigns = $view_args['campaigns']; | |
| 17 | 20 | |
| 18 | -if ( ! $campaigns->have_posts() ) : | |
| 21 | +if ( ! $charitable_campaigns->have_posts() ) : | |
| 19 | 22 | return; |
| 20 | 23 | endif; |
| 21 | 24 | |
| 22 | -$loop_class = charitable_campaign_loop_class( $view_args ); | |
| 23 | -$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 ); | |
| 24 | 27 | |
| 25 | 28 | /** |
| 26 | 29 | * Add something before the campaign loop. |
| 27 | 30 | * |
| @@ -29,19 +32,19 @@ | ||
| 29 | 32 | * |
| 30 | 33 | * @param WP_Query $campaigns The campaigns. |
| 31 | 34 | * @param array $args Loop args. |
| 32 | 35 | */ |
| 33 | -do_action( 'charitable_campaign_loop_before', $campaigns, $args ); | |
| 36 | +do_action( 'charitable_campaign_loop_before', $charitable_campaigns, $charitable_args ); | |
| 34 | 37 | |
| 35 | 38 | ?> |
| 36 | -<ol class="<?php echo esc_attr( $loop_class ) ?>"> | |
| 39 | +<ol class="<?php echo esc_attr( $charitable_loop_class ); ?>"> | |
| 37 | 40 | |
| 38 | 41 | <?php |
| 39 | -while ( $campaigns->have_posts() ) : | |
| 42 | +while ( $charitable_campaigns->have_posts() ) : | |
| 40 | 43 | |
| 41 | - $campaigns->the_post(); | |
| 44 | + $charitable_campaigns->the_post(); | |
| 42 | 45 | |
| 43 | - charitable_template( 'campaign-loop/campaign.php', $args ); | |
| 46 | + charitable_template( 'campaign-loop/campaign.php', $charitable_args ); | |
| 44 | 47 | |
| 45 | 48 | endwhile; |
| 46 | 49 | |
| 47 | 50 | wp_reset_postdata(); |
| @@ -56,5 +59,5 @@ | ||
| 56 | 59 | * |
| 57 | 60 | * @param WP_Query $campaigns The campaigns. |
| 58 | 61 | * @param array $args Loop args. |
| 59 | 62 | */ |
| 60 | -do_action( 'charitable_campaign_loop_after', $campaigns, $args ); | |
| 63 | +do_action( 'charitable_campaign_loop_after', $charitable_campaigns, $charitable_args ); | |