PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0
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 / addons / charitable-recipients / class-charitable-recipients.php

class-charitable-recipients.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.7.0, at includes/addons/charitable-recipients/class-charitable-recipients.php

80 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main class for setting up the Charitable Recipients Addon, which is programatically activated by child themes.
4 *
5 * @package Charitable/Classes/Charitable_Recipients
6 * @author David Bisset
7 * @copyright Copyright (c) 2022, WP Charitable LLC
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.0.0
10 * @version 1.0.0
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 if ( ! class_exists( 'Charitable_Recipients' ) ) :
19
20 /**
21 * Charitable_Recipients
22 *
23 * @since 1.0.0
24 */
25 class Charitable_Recipients implements Charitable_Addon_Interface {
26
27 /**
28 * Responsible for creating class instances.
29 *
30 * @since 1.0.0
31 *
32 * @return void
33 */
34 public static function load() {
35 $object = new Charitable_Recipients();
36
37 do_action( 'charitable_recipients_addon_loaded', $object );
38 }
39
40 /**
41 * Create class instance.
42 *
43 * @since 1.0.0
44 */
45 private function __construct() {
46 $this->load_dependencies();
47 }
48
49 /**
50 * Include required files.
51 *
52 * @since 1.0.0
53 *
54 * @return void
55 */
56 private function load_dependencies() {
57 require_once( 'charitable-recipients-functions.php' );
58 require_once( 'class-charitable-recipient-types.php' );
59 }
60
61 /**
62 * Activate the addon.
63 *
64 * @since 1.0.0
65 *
66 * @return boolean Whether the add-on was activated.
67 */
68 public static function activate() {
69 if ( 'charitable_activate_addon' !== current_filter() ) {
70 return false;
71 }
72
73 self::load();
74
75 return true;
76 }
77 }
78
79 endif;
80