PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.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 All 257 releases
give / src / VendorOverrides / Harbor / Actions / HarborHasLoaded.php

HarborHasLoaded.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/VendorOverrides/Harbor/Actions/HarborHasLoaded.php

30 lines 844 B
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\Actions;
6
7 /**
8 * Whether Harbor has fully loaded, which only happens when a premium plugin
9 * is installed and active.
10 *
11 * Harbor is vendor-prefixed per host plugin, so only one Harbor copy runs as
12 * the version leader so we cannot use the classes to determine if Harbor is loaded.
13 */
14 class HarborHasLoaded
15 {
16 /**
17 * @since 4.16.7
18 *
19 * Safe to call on or after `plugins_loaded`. Harbor fires `lw_harbor/loaded`
20 * during its init (Give boots Harbor from `plugins_loaded`), and only when
21 * at least one premium plugin reports itself via `lw_harbor/premium_plugin_exists`.
22 *
23 * @return bool Whether Harbor has fully loaded.
24 */
25 public function __invoke(): bool
26 {
27 return (bool) did_action('lw_harbor/loaded');
28 }
29 }
30