id = 'hide-backend'; $this->title = __( 'Hide Backend', 'better-wp-security' ); $this->description = __( 'Hide the login page by changing its name and preventing access to wp-login.php and wp-admin.', 'better-wp-security' ); $this->type = 'advanced'; parent::__construct(); } public function handle_form_post( $data ) { $retval = ITSEC_Modules::set_settings( $this->id, $data ); if ( $retval['saved'] ) { if ( $retval['new_settings']['enabled'] ) { $args = array( 'wp-login.php?', $retval['new_settings']['slug'] . '?', ); } else { $args = array( $retval['old_settings']['slug'] . '?', 'wp-login.php?', ); } ITSEC_Response::add_js_function_call( 'itsec_hide_backend_update_logout_url', $args ); } } public function enqueue_scripts_and_styles() { wp_enqueue_script( 'itsec-hide-backend-settings-page-script', plugins_url( 'js/settings-page.js', __FILE__ ), array( 'jquery' ), $this->version, true ); } protected function render_description( $form ) { ?>
get_options(); $permalink_structure = get_option( 'permalink_structure', false ); if ( empty( $permalink_structure ) && ! is_multisite() ) { echo ' \n"; return; } ?>add_checkbox( 'enabled', array( 'class' => 'itsec-settings-toggle' ) ); ?> |