PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.33.5
GiveWP – Donation Plugin and Fundraising Platform v2.33.5
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 / Repositories / Settings.php

Settings.php in GiveWP – Donation Plugin and Fundraising Platform 2.33.5, at src/Tracking/Repositories/Settings.php

67 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\Repositories;
4
5 /**
6 * Class Settings
7 * @package Give\Tracking\Repositories
8 *
9 * @since 2.10.0
10 */
11 class Settings
12 {
13 const USAGE_TRACKING_OPTION_KEY = 'usage_tracking';
14 const USAGE_TRACKING_NOTICE_NAG_OPTION_KEY = 'give_telemetry_hide_usage_tracking_notice';
15
16 /**
17 * Return "usage_tracking" give setting option value.
18 *
19 * @since 2.10.0
20 * @return string
21 */
22 public function getUsageTrackingOptionValue()
23 {
24 return give_get_option(self::USAGE_TRACKING_OPTION_KEY, 'disabled');
25 }
26
27 /**
28 * Get "give_telemetry_hide_usage_tracking_notice" option value.
29 *
30 * @since 2.10.0
31 *
32 * @return string
33 */
34 public function getUsageTrackingNoticeNagOptionValue()
35 {
36 return get_option(self::USAGE_TRACKING_NOTICE_NAG_OPTION_KEY, null);
37 }
38
39 /**
40 * Store "usage_tracking" give setting option value.
41 *
42 * @since 2.10.0
43 *
44 * @param $optionValue
45 *
46 * @return boolean
47 */
48 public function saveUsageTrackingOptionValue($optionValue)
49 {
50 return give_update_option(self::USAGE_TRACKING_OPTION_KEY, $optionValue);
51 }
52
53 /**
54 * Store "give_hide_usage_tracking_notice" option value.
55 *
56 * @since 2.10.0
57 *
58 * @param int $optionValue
59 *
60 * @return string
61 */
62 public function saveUsageTrackingNoticeNagOptionValue($optionValue)
63 {
64 return update_option(self::USAGE_TRACKING_NOTICE_NAG_OPTION_KEY, $optionValue, false);
65 }
66 }
67