PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.8
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.8
1.8.13 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 All 211 releases
charitable / templates / widgets / donors.php

donors.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.6.8, at templates/widgets/donors.php

36 lines 939 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Display a widget with donors, either for a specific campaign or sitewide.
4 *
5 * Override this template by copying it to yourtheme/charitable/widgets/donors.php
6 *
7 * @package Charitable/Templates/Widgets
8 * @author Studio 164a
9 * @since 1.0.0
10 * @version 1.5.0
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) { exit; }
15
16 if ( ! charitable_is_campaign_page() && 'current' == $view_args['campaign_id'] ) {
17 return;
18 }
19
20 $widget_title = apply_filters( 'widget_title', $view_args['title'] );
21
22 /* If there are no donors and the widget is configured to hide when empty, return now. */
23 if ( ! $view_args['donors']->count() && $view_args['hide_if_no_donors'] ) {
24 return;
25 }
26
27 echo $view_args['before_widget'];
28
29 if ( ! empty( $widget_title ) ) :
30 echo $view_args['before_title'] . $widget_title . $view_args['after_title'];
31 endif;
32
33 charitable_template( 'donor-loop.php', $view_args );
34
35 echo $view_args['after_widget'];
36