PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/behavior/class-wpmudev.php +11 -11 5.8.1 → 6.3.0 View file →
@@ -40,22 +40,22 @@
40 40 *
41 41 * @return bool|string
42 42 */
43 43 public function get_apikey() {
44 - if ( ! class_exists( '\WPMUDEV_Dashboard' ) ) {
45 - return false;
44 + if ( $this->is_site_connected_to_hub_via_hcm_or_dash() && '' !== $this->get_api_key() ) {
45 + return $this->get_api_key();
46 46 }
47 47
48 - \WPMUDEV_Dashboard::instance();
48 + return false;
49 + }
49 50
50 - $membership_status = \WPMUDEV_Dashboard::$api->get_membership_data();
51 - $key = \WPMUDEV_Dashboard::$api->get_key();
52 -
53 - if ( isset( $membership_status['hub_site_id'] ) && $membership_status['hub_site_id'] && '' !== $key ) {
54 - return $key;
55 - }
56 -
57 - return false;
51 + /**
52 + * Is the Hub API key available?
53 + *
54 + * @return bool
55 + */
56 + public function is_apikey_available(): bool {
57 + return false !== $this->get_apikey();
58 58 }
59 59
60 60 /**
61 61 * Check if whitelabel is enabled.