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 / widgets / class-charitable-widgets.php

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

78 lines 1.8 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) 2015, Studio 164a
11 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12 */
13
14 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15
16 if ( ! class_exists( 'Charitable_Widgets' ) ) :
17
18 /**
19 * Charitable_Widgets
20 *
21 * @final
22 * @since 1.0.0
23 */
24 final class Charitable_Widgets {
25
26 /**
27 * The single instance of this class.
28 *
29 * @var Charitable_Widgets|null
30 * @access private
31 * @static
32 */
33 private static $instance = null;
34
35 /**
36 * Returns and/or create the single instance of this class.
37 *
38 * @return Charitable_Widgets
39 * @access public
40 * @since 1.2.0
41 */
42 public static function get_instance() {
43 if ( is_null( self::$instance ) ) {
44 self::$instance = new Charitable_Widgets();
45 }
46
47 return self::$instance;
48 }
49
50 /**
51 * Set up the class. This can only be loaded with the get_instance() method.
52 *
53 * @access private
54 * @since 1.0.0
55 */
56 private function __construct() {
57 add_action( 'widgets_init', array( $this, 'register_widgets' ) );
58 }
59
60 /**
61 * Register widgets.
62 *
63 * @see widgets_init hook
64 * @return void
65 * @access public
66 * @since 1.0.0
67 * @return void
68 */
69 public function register_widgets() {
70 register_widget( 'Charitable_Campaign_Terms_Widget' );
71 register_widget( 'Charitable_Campaigns_Widget' );
72 register_widget( 'Charitable_Donors_Widget' );
73 register_widget( 'Charitable_Donate_Widget' );
74 register_widget( 'Charitable_Donation_Stats_Widget' );
75 }
76 }
77
78 endif; // End class_exists check.