'render_tab1', ); function __construct() { $this->render_menu_page(); } function set_menu_tabs() { $this->menu_tabs = array( 'tab1' => __('Visitor Lockout', 'all-in-one-wp-security-and-firewall'), ); } function get_current_tab() { $tab_keys = array_keys($this->menu_tabs); $tab = isset( $_GET['tab'] ) ? sanitize_text_field($_GET['tab']) : $tab_keys[0]; return $tab; } /* * Renders our tabs of this menu as nav items */ function render_menu_tabs() { $current_tab = $this->get_current_tab(); echo ''; } /* * The menu rendering goes here */ function render_menu_page() { echo '
'; echo '

'.__('Maintenance','all-in-one-wp-security-and-firewall').'

';//Interface title $this->set_menu_tabs(); $tab = $this->get_current_tab(); $this->render_menu_tabs(); ?>
menu_tabs); call_user_func(array(&$this, $this->menu_tabs_handler[$tab])); ?>
debug_logger->log_debug("Nonce check failed on site lockout feature settings save!",4); die("Nonce check failed on site lockout feature settings save!"); } //Save settings $aio_wp_security->configs->set_value('aiowps_site_lockout',isset($_POST["aiowps_site_lockout"])?'1':''); $maint_msg = htmlentities(stripslashes($_POST['aiowps_site_lockout_msg']), ENT_COMPAT, "UTF-8"); $aio_wp_security->configs->set_value('aiowps_site_lockout_msg',$maint_msg);//Text area/msg box $aio_wp_security->configs->save_config(); $this->show_msg_updated(__('Site lockout feature settings saved!', 'all-in-one-wp-security-and-firewall')); } ?>

'.__('This feature allows you to put your site into "maintenance mode" by locking down the front-end to all visitors except logged in users with super admin privileges.', 'all-in-one-wp-security-and-firewall').'

'; echo '

'.__('Locking your site down to general visitors can be useful if you are investigating some issues on your site or perhaps you might be doing some maintenance and wish to keep out all traffic for security reasons.', 'all-in-one-wp-security-and-firewall').'

'; ?>
: configs->get_value('aiowps_site_lockout')=='1') echo ' checked="checked"'; ?> value="1"/>
configs->get_value('aiowps_site_lockout_msg'); if(empty($aiowps_site_lockout_msg_raw)){ $aiowps_site_lockout_msg_raw = 'This site is currently not available. Please try again later.'; } $aiowps_site_lockout_msg = html_entity_decode($aiowps_site_lockout_msg_raw, ENT_COMPAT, "UTF-8"); $aiowps_site_lockout_msg_settings = array('textarea_name' => 'aiowps_site_lockout_msg'); wp_editor($aiowps_site_lockout_msg, "aiowps_site_lockout_msg_editor_content", $aiowps_site_lockout_msg_settings); ?>