PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.2.2
Defender Security – Malware Scanner, Login Security & Firewall v6.2.2
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
defender-security / src / integrations / class-hummingbird.php

class-hummingbird.php in Defender Security – Malware Scanner, Login Security & Firewall 6.2.2, at src/integrations/class-hummingbird.php

50 lines 973 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Handles interactions with Hummingbird.
4 *
5 * @since 2.6.1
6 * @package WP_Defender\Integrations
7 */
8
9 namespace WP_Defender\Integrations;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * Hummingbird integration module.
17 */
18 class Hummingbird {
19
20 /**
21 * Check if Hummingbird is active.
22 *
23 * @return bool
24 */
25 public function is_hummingbird_enabled() {
26 return class_exists( 'Hummingbird\\WP_Hummingbird' );
27 }
28
29 /**
30 * Check if Hummingbird has lazy load comments enabled.
31 *
32 * @return bool
33 */
34 public function is_lazy_load_comments_enabled() {
35 if ( ! $this->is_hummingbird_enabled() ) {
36 return false;
37 }
38
39 $settings = is_multisite() ? get_site_option( 'wphb_settings', array() ) : get_option(
40 'wphb_settings',
41 array()
42 );
43 if ( ! is_array( $settings ) || array() === $settings ) {
44 return false;
45 }
46
47 return isset( $settings['advanced']['lazy_load']['enabled'] ) && true === $settings['advanced']['lazy_load']['enabled'];
48 }
49 }
50