PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.3.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.3.2
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 / includes / shortcodes / class-charitable-my-donations-shortcode.php

class-charitable-my-donations-shortcode.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.3.2, at includes/shortcodes/class-charitable-my-donations-shortcode.php

61 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * My Donations shortcode class.
4 *
5 * @version 1.0.0
6 * @package Charitable/Shortcodes/My Donations
7 * @category Class
8 * @author Eric Daams
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
13 if ( ! class_exists( 'Charitable_My_Donations_Shortcode' ) ) :
14
15 /**
16 * Charitable_My_Donations_Shortcode class.
17 *
18 * @since 1.0.0
19 */
20 class Charitable_My_Donations_Shortcode {
21
22 /**
23 * The callback method for the campaigns shortcode.
24 *
25 * This receives the user-defined attributes and passes the logic off to the class.
26 *
27 * @param array $atts User-defined shortcode attributes.
28 * @return string
29 * @access public
30 * @static
31 * @since 1.0.0
32 */
33 public static function display( $atts ) {
34 $args = shortcode_atts( $default, $atts, 'donations' );
35
36 $view_args = array(
37 'donations' => self::get_donations( $args )
38 );
39
40 ob_start();
41
42 charitable_template( 'shortcodes/my-donations.php', $view_args );
43
44 return apply_filters( 'charitable_my_donations_shortcode', ob_get_clean(), $args );
45 }
46
47 /**
48 * Return donations to display with the shortcode.
49 *
50 * @param array $args
51 * @return WP_Query
52 * @access public
53 * @static
54 * @since 1.0.0
55 */
56 public static function get_donations( $args ) {
57
58 }
59 }
60
61 endif;