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/controller/class-scan.php +13 -5 6.2.3 → 6.3.0 View file →
@@ -79,8 +79,15 @@
79 79 */
80 80 private $quarantine_controller;
81 81
82 82 /**
83 + * Is the Malware Report option unlocked?
84 + *
85 + * @var bool
86 + */
87 + private $is_unlocked;
88 +
89 + /**
83 90 * Initializes the model and service, registers routes, and sets up scheduled events if the model is active.
84 91 */
85 92 public function __construct() {
86 93 $this->register_page(
@@ -92,10 +99,10 @@
92 99
93 100 $this->model = wd_di()->get( Scan_Settings::class );
94 101 $this->service = wd_di()->get( Scan_Component::class );
95 102 $this->quarantine_controller = wd_di()->get( Quarantine::class );
96 - $wpmudev = wd_di()->get( WPMUDEV::class );
97 103
104 + $this->is_unlocked = wd_di()->get( WPMUDEV::class )->is_pro();
98 105
99 106 $this->register_routes();
100 107 add_action( 'defender_enqueue_assets', array( $this, 'enqueue_assets' ) );
101 108 add_action( 'wp_ajax_defender_process_scan', array( $this, 'process' ) );
@@ -109,9 +116,9 @@
109 116 if (
110 117 is_admin() &&
111 118 'plugins.php' === $pagenow &&
112 119 apply_filters( 'wd_display_vulnerability_warnings', true ) &&
113 - $wpmudev->is_apikey_available()
120 + wd_di()->get( WPMUDEV::class )->is_apikey_available()
114 121 ) {
115 122 $this->service->display_vulnerability_warnings();
116 123 }
117 124
@@ -861,9 +868,9 @@
861 868 return array( 'scan' => $data );
862 869 }
863 870
864 871 /**
865 - * Render main page.
872 + * Render the main page.
866 873 *
867 874 * @return void
868 875 */
869 876 public function main_view(): void {
@@ -922,9 +929,9 @@
922 929 );
923 930
924 931 wp_enqueue_style(
925 932 $handle,
926 - WP_DEFENDER_BASE_URL . 'assets/css/showcase.css',
933 + WP_DEFENDER_BASE_URL . 'assets/css/core-ui.css',
927 934 array(),
928 935 DEFENDER_VERSION
929 936 );
930 937
@@ -1073,9 +1080,10 @@
1073 1080
1074 1081 if ( 'enabled' === $config['notification'] ) {
1075 1082 $strings[] = esc_html__( 'Email notifications active', 'defender-security' );
1076 1083 }
1077 - if ( ! ( property_exists( $this, 'is_pro' ) ? $this->is_pro : wd_di()->get( WPMUDEV::class )->is_pro() ) ) {
1084 + // No Pro membership and No hosted site.
1085 + if ( ! $this->is_unlocked ) {
1078 1086 $strings[] = sprintf(
1079 1087 /* translators: %s: Html for Pro-tag. */
1080 1088 esc_html__( 'Scheduled scan inactive %s', 'defender-security' ),
1081 1089 '<span class="sui-tag sui-tag-pro">Pro</span>'