array( 'title' => __('Rename login page', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_rename_login'), ), 'cookie-based-brute-force-prevention' => array( 'title' => __('Cookie based brute force prevention', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_cookie_based_brute_force_prevention'), 'display_condition_callback' => 'is_main_site', ), 'captcha-settings' => array( 'title' => __('CAPTCHA settings', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_captcha_settings'), ), 'login-whitelist' => array( 'title' => __('Login whitelist', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_login_whitelist'), ), '404-detection' => array( 'title' => __('404 detection', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_404_detection'), 'display_condition_callback' => array('AIOWPSecurity_Utility_Permissions', 'is_main_site_and_super_admin'), ), 'honeypot' => array( 'title' => __('Honeypot', 'all-in-one-wp-security-and-firewall'), 'render_callback' => array($this, 'render_honeypot'), ), ); $this->menu_tabs = array_filter($menu_tabs, array($this, 'should_display_tab')); } /** * Rename login page tab. * * @global $aio_wp_security * @global $aiowps_feature_mgr */ protected function render_rename_login() { global $aio_wp_security, $aiowps_feature_mgr; if (get_option('permalink_structure')) { $home_url = trailingslashit(home_url()); } else { $home_url = trailingslashit(home_url()) . '?'; } $aio_wp_security->include_template('wp-admin/brute-force/rename-login.php', false, array('aiowps_feature_mgr' => $aiowps_feature_mgr, 'home_url' => $home_url)); } /** * Cookie based brute force prevention tab. * * @global $aio_wp_security * @global $aiowps_feature_mgr * * @return void */ protected function render_cookie_based_brute_force_prevention() { global $aio_wp_security; global $aiowps_feature_mgr; $aio_wp_security->include_template('wp-admin/brute-force/cookie-based-brute-force-prevention.php', false, array('aiowps_feature_mgr' => $aiowps_feature_mgr)); } /** * Login captcha tab. * * @global $aio_wp_security * @global $aiowps_feature_mgr * * @return void */ protected function render_captcha_settings() { global $aio_wp_security, $aiowps_feature_mgr; $supported_captchas = $aio_wp_security->captcha_obj->get_supported_captchas(); $captcha_themes = $aio_wp_security->captcha_obj->get_captcha_themes(); $captcha_theme = 'auto'; if ('cloudflare-turnstile' == $aio_wp_security->configs->get_value('aiowps_default_captcha')) $captcha_theme = $aio_wp_security->configs->get_value('aiowps_turnstile_theme'); if ('cloudflare-turnstile' == $aio_wp_security->configs->get_value('aiowps_default_captcha') && false === $aio_wp_security->captcha_obj->cloudflare_turnstile_verify_configuration($aio_wp_security->configs->get_value('aiowps_turnstile_site_key'), $aio_wp_security->configs->get_value('aiowps_turnstile_secret_key'))) { echo '
' . esc_html__('Your Cloudflare Turnstile configuration is invalid.', 'all-in-one-wp-security-and-firewall').' ' . esc_html__('Please enter the correct Cloudflare Turnstile keys below to use the Turnstile feature.', 'all-in-one-wp-security-and-firewall').'
' . esc_html__('Your Google reCAPTCHA configuration is invalid.', 'all-in-one-wp-security-and-firewall') . ' ' . esc_html__('Please enter the correct reCAPTCHA keys below to use the reCAPTCHA feature.', 'all-in-one-wp-security-and-firewall').'