PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.22
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.22
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.6.22, at templates/campaign-loop.php

63 lines 1.2 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.5.7
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 $campaigns = $view_args['campaigns'];
19
20 if ( ! $campaigns->have_posts() ) :
21 return;
22 endif;
23
24 $loop_class = charitable_campaign_loop_class( $view_args );
25 $args = charitable_campaign_loop_args( $view_args );
26
27 /**
28 * Add something before the campaign loop.
29 *
30 * @since 1.5.0
31 *
32 * @param WP_Query $campaigns The campaigns.
33 * @param array $args Loop args.
34 */
35 do_action( 'charitable_campaign_loop_before', $campaigns, $args );
36
37 ?>
38 <ol class="<?php echo esc_attr( $loop_class ); ?>">
39
40 <?php
41 while ( $campaigns->have_posts() ) :
42
43 $campaigns->the_post();
44
45 charitable_template( 'campaign-loop/campaign.php', $args );
46
47 endwhile;
48
49 wp_reset_postdata();
50 ?>
51 </ol>
52 <?php
53
54 /**
55 * Add something after the campaign loop.
56 *
57 * @since 1.5.0
58 *
59 * @param WP_Query $campaigns The campaigns.
60 * @param array $args Loop args.
61 */
62 do_action( 'charitable_campaign_loop_after', $campaigns, $args );
63