PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.13.1
GiveWP – Donation Plugin and Fundraising Platform v2.13.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 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Tracking / AdminSettings.php
AdminSettings.php
51 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Give\Tracking;
3
4 use Give\Tracking\Repositories\Settings;
5 use Give_Admin_Settings;
6
7 /**
8 * Class AdminSettings
9 * @package Give\Tracking
10 *
11 * @since 2.10.0
12 */
13 class AdminSettings {
14 /**
15 * Add admin settings.
16 *
17 * @since 2.10.0
18 *
19 * @param array $settings
20 *
21 * @return mixed
22 */
23 public function addSettings( $settings ) {
24 if ( ! Give_Admin_Settings::is_setting_page( 'advanced', 'advanced-options' ) ) {
25 return $settings;
26 }
27
28 array_splice(
29 $settings,
30 -2,
31 0,
32 [
33 [
34 'name' => __( 'Anonymous Usage Tracking', 'give' ),
35 'label' => esc_html__( 'Allow usage of GiveWP to be tracked.', 'give' ),
36 'desc' => esc_html__( '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.', 'give' ),
37 'id' => Settings::USAGE_TRACKING_OPTION_KEY,
38 'type' => 'radio_inline',
39 'default' => 'disabled',
40 'options' => [
41 'enabled' => esc_html__( 'Enabled', 'give' ),
42 'disabled' => esc_html__( 'Disabled', 'give' ),
43 ],
44 ],
45 ]
46 );
47
48 return $settings;
49 }
50 }
51