PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 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 All 256 releases
give / src / VendorOverrides / Harbor / HarborServiceProvider.php

HarborServiceProvider.php in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at src/VendorOverrides/Harbor/HarborServiceProvider.php

51 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\VendorOverrides\Harbor;
6
7 use Give\Helpers\Hooks;
8 use Give\ServiceProviders\ServiceProvider as ServiceProviderContract;
9 use Give\VendorOverrides\Harbor\Actions\HasActivePremiumAddons;
10 use Give\VendorOverrides\Harbor\Actions\ReportLegacyLicences;
11 use Give\Vendors\LiquidWeb\Harbor\Config;
12 use Give\Vendors\LiquidWeb\Harbor\Harbor;
13
14 /**
15 * @since 4.15.0
16 */
17 class HarborServiceProvider implements ServiceProviderContract
18 {
19 /**
20 * @since 4.15.2 Register lw_harbor/premium_plugin_exists filter
21 * @since 4.15.0
22 *
23 * @inheritDoc
24 */
25 public function register()
26 {
27 Config::set_plugin_basename(GIVE_PLUGIN_BASENAME);
28 Config::set_container(give()->getContainer());
29
30 // reports whether any GiveWP premium add-on is active to Harbor
31 Hooks::addFilter('lw_harbor/premium_plugin_exists', HasActivePremiumAddons::class);
32
33 Harbor::init();
34 }
35
36 /**
37 * @since 4.15.0
38 *
39 * @inheritDoc
40 */
41 public function boot()
42 {
43 // reports legacy licenses to Harbor
44 Hooks::addFilter('stellarwp/harbor/legacy_licenses', ReportLegacyLicences::class);
45
46 // adds a "licensing" submenu to Give
47 lw_harbor_register_submenu('edit.php?post_type=give_forms');
48 }
49
50 }
51