PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
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 2.31.0 All 254 releases
give / src / Settings / ServiceProvider.php

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

46 lines 1.2 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;
4
5 use Give\Helpers\Hooks;
6 use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface;
7 use Give\Settings\DonationForms\Actions\SanitizeCustomFormStyles;
8 use Give\Settings\Security\Actions\RegisterPage;
9 use Give\Settings\Security\Actions\RegisterSection;
10 use Give\Settings\Security\Actions\RegisterSettings;
11
12 /**
13 * Class ServiceProvider
14 *
15 * @since 3.17.0
16 */
17 class ServiceProvider implements ServiceProviderInterface
18 {
19 /**
20 * @since 3.17.0
21 */
22 public function register()
23 {
24 }
25
26 /**
27 * @since 3.17.0
28 */
29 public function boot()
30 {
31 $this->registerSecuritySettings();
32 }
33
34 /**
35 * @since 4.5.0 Add custom form styles sanitization
36 * @since 3.17.0
37 */
38 private function registerSecuritySettings(): void
39 {
40 Hooks::addFilter('give-settings_get_settings_pages', RegisterPage::class);
41 Hooks::addFilter('give_get_sections_security', RegisterSection::class);
42 Hooks::addFilter('give_get_settings_security', RegisterSettings::class);
43 Hooks::addFilter('give_admin_settings_sanitize_option', SanitizeCustomFormStyles::class, '__invoke', 10, 3);
44 }
45 }
46