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

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