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

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

77 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Charitable widgets class.
4 *
5 * Registers custom widgets for Charitable.
6 *
7 * @version 1.0.0
8 * @package Charitable/Classes/Charitable_Widgets
9 * @author Eric Daams
10 * @copyright Copyright (c) 2019, Studio 164a
11 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12 */
13
14 // Exit if accessed directly.
15 if ( ! defined( 'ABSPATH' ) ) { exit; }
16
17 if ( ! class_exists( 'Charitable_Widgets' ) ) :
18
19 /**
20 * Charitable_Widgets
21 *
22 * @final
23 * @since 1.0.0
24 */
25 final class Charitable_Widgets {
26
27 /**
28 * The single instance of this class.
29 *
30 * @var Charitable_Widgets|null
31 */
32 private static $instance = null;
33
34 /**
35 * Returns and/or create the single instance of this class.
36 *
37 * @since 1.2.0
38 *
39 * @return Charitable_Widgets
40 */
41 public static function get_instance() {
42 if ( is_null( self::$instance ) ) {
43 self::$instance = new self();
44 }
45
46 return self::$instance;
47 }
48
49 /**
50 * Set up the class. This can only be loaded with the get_instance() method.
51 *
52 * @since 1.0.0
53 */
54 private function __construct() {
55 add_action( 'widgets_init', array( $this, 'register_widgets' ) );
56 }
57
58 /**
59 * Register widgets.
60 *
61 * @see widgets_init hook
62 *
63 * @since 1.0.0
64 *
65 * @return void
66 */
67 public function register_widgets() {
68 register_widget( 'Charitable_Campaign_Terms_Widget' );
69 register_widget( 'Charitable_Campaigns_Widget' );
70 register_widget( 'Charitable_Donors_Widget' );
71 register_widget( 'Charitable_Donate_Widget' );
72 register_widget( 'Charitable_Donation_Stats_Widget' );
73 }
74 }
75
76 endif;
77