Complete the code to activate the WordPress security plugin.
activate_plugin('[1]');
The Wordfence plugin is a popular security plugin for WordPress. Activating it requires its main file path.
Complete the code to check if the Wordfence plugin is active.
if (is_plugin_active('[1]')) { // plugin is active }
To check if Wordfence is active, use its main plugin file path in the is_plugin_active function.
Fix the error in the code to add a firewall rule using Wordfence API.
Wordfence::[1]('block_ip', $ip_address);
The correct Wordfence method to add a firewall rule is add_firewall_rule with underscores.
Fill both blanks to create a security settings array for a plugin.
$settings = [ 'firewall_enabled' => [1], 'scan_frequency' => '[2]' ];
Enabling the firewall requires true. Setting scan frequency to daily is common for security.
Fill all three blanks to configure a security plugin with user roles and notifications.
$config = [ 'allowed_roles' => [1], 'notify_admin' => [2], 'notification_email' => '[3]' ];
Security plugins often allow only admin and editor roles to access sensitive features. Notifications should be enabled with the admin's email.