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-password-protection.php +2 -17 5.9.0 → 6.3.0 View file →
@@ -49,9 +49,8 @@
49 49 $this->model = wd_di()->get( \WP_Defender\Model\Setting\Password_Protection::class );
50 50 $this->service = wd_di()->get( \WP_Defender\Component\Password_Protection::class );
51 51 $default_values = $this->model->get_default_values();
52 52 $this->default_msg = $default_values['message'];
53 - add_filter( 'wp_defender_advanced_tools_data', array( $this, 'script_data' ) );
54 53 $this->register_routes();
55 54 if ( $this->model->is_active() ) {
56 55 // Update site url on sub-site when MaskLogin is disabled.
57 56 if (
@@ -213,21 +212,8 @@
213 212 return new \WP_Defender\Model\Setting\Password_Protection();
214 213 }
215 214
216 215 /**
217 - * Provide data to the frontend via localized script.
218 - *
219 - * @param array $data Data collection is ready to passed.
220 - *
221 - * @return array Modified data array with added this controller data.
222 - */
223 - public function script_data( array $data ): array {
224 - $data['password_protection'] = $this->data_frontend();
225 -
226 - return $data;
227 - }
228 -
229 - /**
230 216 * Save settings.
231 217 *
232 218 * @param Request $request The request object containing new settings data.
233 219 *
@@ -390,16 +376,15 @@
390 376 );
391 377 }
392 378
393 379 /**
394 - * Generates configuration strings based on the provided configuration and whether the product is a pro version.
380 + * Generates configuration strings based on the provided configuration.
395 381 *
396 382 * @param mixed $config The configuration data.
397 - * @param bool $is_pro Indicates if the product is a pro version.
398 383 *
399 384 * @return array Returns an array of configuration strings.
400 385 */
401 - public function config_strings( $config, bool $is_pro ): array {
386 + public function config_strings( $config ): array {
402 387 $is_enabled = isset( $config['enabled'] ) ? (bool) $config['enabled'] : false;
403 388 if (
404 389 ! $is_enabled ||
405 390 ! isset( $config['user_roles'] ) ||