PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.1.0
GiveWP – Donation Plugin and Fundraising Platform v4.1.0
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 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Tracking / AdminSettings.php
AdminSettings.php
57 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 namespace Give\Tracking;
4
5 use Give\Tracking\Repositories\Settings;
6 use Give_Admin_Settings;
7
8 /**
9 * Class AdminSettings
10 * @package Give\Tracking
11 *
12 * @since 2.10.0
13 */
14 class AdminSettings
15 {
16 /**
17 * Add admin settings.
18 *
19 * @since 2.10.0
20 *
21 * @param array $settings
22 *
23 * @return mixed
24 */
25 public function addSettings($settings)
26 {
27 if ( ! Give_Admin_Settings::is_setting_page('advanced', 'advanced-options')) {
28 return $settings;
29 }
30
31 array_splice(
32 $settings,
33 -2,
34 0,
35 [
36 [
37 'name' => __('Anonymous Usage Tracking', 'give'),
38 'label' => esc_html__('Allow usage of GiveWP to be tracked.', 'give'),
39 'desc' => esc_html__(
40 'Can GiveWP collect data about the usage of the plugin? Usage data is completely anonymous, does not include any personal information, and will only be used to improve the software.',
41 'give'
42 ),
43 'id' => Settings::USAGE_TRACKING_OPTION_KEY,
44 'type' => 'radio_inline',
45 'default' => 'disabled',
46 'options' => [
47 'enabled' => esc_html__('Enabled', 'give'),
48 'disabled' => esc_html__('Disabled', 'give'),
49 ],
50 ],
51 ]
52 );
53
54 return $settings;
55 }
56 }
57