PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
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 / ThirdPartySupport / Elementor / Settings / RegisterSettings.php

RegisterSettings.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/ThirdPartySupport/Elementor/Settings/RegisterSettings.php

58 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\ThirdPartySupport\Elementor\Settings;
4
5 /**
6 * @since 4.7.0
7 */
8 class RegisterSettings
9 {
10 /**
11 * @since 4.7.0
12 */
13 public function __invoke(array $settings): array
14 {
15 if ('elementor' !== give_get_current_setting_section()) {
16 return $settings;
17 }
18
19 return $this->getSettings();
20 }
21
22 /**
23 * @since 4.7.0
24 */
25 protected function getSettings(): array
26 {
27 return [
28 [
29 'id' => 'give_title_settings_elementor_1',
30 'type' => 'title',
31 ],
32 $this->getElementorSettings(),
33 [
34 'id' => 'give_title_settings_elementor_1',
35 'type' => 'sectionend',
36 ],
37 ];
38 }
39
40 /**
41 * @since 4.7.0
42 */
43 public function getElementorSettings(): array
44 {
45 return [
46 'name' => __('Enable Elementor Legacy Widgets', 'give'),
47 'desc' => __('If enabled, this option will add legacy widgets to elementor that were previously available in the GiveWP Elementor Widgets plugin.', 'give'),
48 'id' => 'givewp_elementor_legacy_widgets_enabled',
49 'type' => 'radio_inline',
50 'default' => 'disabled',
51 'options' => [
52 'enabled' => __('Enabled', 'give'),
53 'disabled' => __('Disabled', 'give'),
54 ],
55 ];
56 }
57 }
58