PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
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 2.3.2 2.30.0 All 255 releases
give / src / Settings / Security / Actions / RegisterSettings.php

RegisterSettings.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/Settings/Security/Actions/RegisterSettings.php

62 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Settings\Security\Actions;
4
5 /**
6 * @since 3.17.0
7 */
8 class RegisterSettings
9 {
10 /**
11 * @since 3.17.0
12 */
13 public function __invoke(array $settings): array
14 {
15 if ('security' !== give_get_current_setting_section()) {
16 return $settings;
17 }
18
19 return $this->getSettings();
20 }
21
22 /**
23 * @since 3.17.0
24 */
25 protected function getSettings(): array
26 {
27 return [
28 [
29 'id' => 'give_title_settings_security_1',
30 'type' => 'title',
31 ],
32 $this->getHoneypotSettings(),
33 [
34 'id' => 'give_title_settings_security_1',
35 'type' => 'sectionend',
36 ],
37 ];
38 }
39
40 /**
41 * @since 3.17.1 enable by default
42 * @since 3.17.0
43 */
44 public function getHoneypotSettings(): array
45 {
46 return [
47 'name' => __('Enable Honeypot Field', 'give'),
48 'desc' => __(
49 'If enabled, this option will add a honeypot security measure to all donation forms',
50 'give'
51 ),
52 'id' => 'givewp_donation_forms_honeypot_enabled',
53 'type' => 'radio_inline',
54 'default' => 'enabled',
55 'options' => [
56 'enabled' => __('Enabled', 'give'),
57 'disabled' => __('Disabled', 'give'),
58 ],
59 ];
60 }
61 }
62