PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.22
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.22
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 / admin / settings / class-charitable-advanced-settings.php

class-charitable-advanced-settings.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.6.22, at includes/admin/settings/class-charitable-advanced-settings.php

93 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Charitable Advanced Settings UI.
4 *
5 * @package Charitable/Classes/Charitable_Advanced_Settings
6 * @author Eric Daams
7 * @copyright Copyright (c) 2019, Studio 164a
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.0.0
10 * @version 1.2.0
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 if ( ! class_exists( 'Charitable_Advanced_Settings' ) ) :
19
20 /**
21 * Charitable_Advanced_Settings
22 *
23 * @final
24 * @since 1.0.0
25 */
26 final class Charitable_Advanced_Settings {
27
28 /**
29 * The single instance of this class.
30 *
31 * @var Charitable_Advanced_Settings|null
32 */
33 private static $instance = null;
34
35 /**
36 * Create object instance.
37 *
38 * @since 1.0.0
39 */
40 private function __construct() {
41 }
42
43 /**
44 * Returns and/or create the single instance of this class.
45 *
46 * @since 1.2.0
47 *
48 * @return Charitable_Advanced_Settings
49 */
50 public static function get_instance() {
51 if ( is_null( self::$instance ) ) {
52 self::$instance = new self();
53 }
54
55 return self::$instance;
56 }
57
58 /**
59 * Add the advanced tab settings fields.
60 *
61 * @since 1.0.0
62 *
63 * @return array<string,array>
64 */
65 public function add_advanced_fields() {
66 if ( ! charitable_is_settings_view( 'advanced' ) ) {
67 return array();
68 }
69
70 return array(
71 'section' => array(
72 'title' => '',
73 'type' => 'hidden',
74 'priority' => 10000,
75 'value' => 'advanced',
76 ),
77 'section_dangerous' => array(
78 'title' => __( 'Dangerous Settings', 'charitable' ),
79 'type' => 'heading',
80 'priority' => 100,
81 ),
82 'delete_data_on_uninstall' => array(
83 'label_for' => __( 'Reset Data', 'charitable' ),
84 'type' => 'checkbox',
85 'help' => __( 'DELETE ALL DATA when uninstalling the plugin.', 'charitable' ),
86 'priority' => 105,
87 ),
88 );
89 }
90 }
91
92 endif;
93