PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.3.1
GiveWP – Donation Plugin and Fundraising Platform v2.3.1
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / includes / admin / tools / class-settings-data.php

class-settings-data.php in GiveWP – Donation Plugin and Fundraising Platform 2.3.1, at includes/admin/tools/class-settings-data.php

91 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 * Give Settings Page/Tab
4 *
5 * @package Give
6 * @subpackage Classes/Give_Settings_Data
7 * @copyright Copyright (c) 2016, GiveWP
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.8
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 if ( ! class_exists( 'Give_Settings_Data' ) ) :
17
18 /**
19 * Give_Settings_Data.
20 *
21 * @sine 1.8
22 */
23 class Give_Settings_Data extends Give_Settings_Page {
24
25 /**
26 * Flag to check if enable saving option for setting page or not
27 *
28 * @since 1.8.17
29 * @var bool
30 */
31 protected $enable_save = false;
32
33 /**
34 * Constructor.
35 */
36 public function __construct() {
37 $this->id = 'data';
38 $this->label = esc_html__( 'Data', 'give' );
39
40 parent::__construct();
41
42 // Do not use main form for this tab.
43 if( give_get_current_setting_tab() === $this->id ) {
44 add_action( "give-tools_open_form", '__return_empty_string' );
45 add_action( "give-tools_close_form", '__return_empty_string' );
46 }
47 }
48
49 /**
50 * Get settings array.
51 *
52 * @since 1.8
53 * @return array
54 */
55 public function get_settings() {
56 // Get settings.
57 $settings = apply_filters( 'give_settings_data', array(
58 array(
59 'id' => 'give_tools_tools',
60 'type' => 'title',
61 'table_html' => false
62 ),
63 array(
64 'id' => 'api',
65 'name' => esc_html__( 'Tools', 'give' ),
66 'type' => 'data',
67 ),
68 array(
69 'id' => 'give_tools_tools',
70 'type' => 'sectionend',
71 'table_html' => false
72 )
73 ));
74
75 /**
76 * Filter the settings.
77 *
78 * @since 1.8
79 * @param array $settings
80 */
81 $settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
82
83 // Output.
84 return $settings;
85 }
86 }
87
88 endif;
89
90 return new Give_Settings_Data();
91