PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.3.4
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.3.4
1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 1.8.0 All 210 releases
charitable / templates / campaign-loop.php

campaign-loop.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.3.4, at templates/campaign-loop.php

52 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Displays the campaign loop.
4 *
5 * Override this template by copying it to yourtheme/charitable/campaign-loop.php
6 *
7 * @author Studio 164a
8 * @package Charitable/Templates/Campaign
9 * @since 1.0.0
10 * @version 1.2.3
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
15 $campaigns = $view_args[ 'campaigns' ];
16 $columns = $view_args[ 'columns' ];
17 $args = charitable_campaign_loop_args( $view_args );
18
19 if ( ! $campaigns->have_posts() ) :
20 return;
21 endif;
22
23 if ( $columns > 1 ) :
24 $loop_class = sprintf( 'campaign-loop campaign-grid campaign-grid-%d', $columns );
25 else :
26 $loop_class = 'campaign-loop campaign-list';
27 endif;
28
29 /**
30 * @hook charitable_campaign_loop_before
31 */
32 do_action( 'charitable_campaign_loop_before', $campaigns, $args );
33 ?>
34 <ol class="<?php echo $loop_class ?>">
35
36 <?php
37 while( $campaigns->have_posts() ) :
38
39 $campaigns->the_post();
40
41 charitable_template( 'campaign-loop/campaign.php', $args );
42
43 endwhile;
44
45 wp_reset_postdata();
46 ?>
47 </ol>
48 <?php
49 /**
50 * @hook charitable_campaign_loop_after
51 */
52 do_action( 'charitable_campaign_loop_after', $campaigns, $args );