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 '
'; printf( __( 'You must change WordPress permalinks to a setting other than "Plain" in order to use this feature.', 'better-wp-security' ), network_admin_url( 'options-permalink.php' ) ); echo "
\n"; return; } ?>
add_checkbox( 'enabled', array( 'class' => 'itsec-settings-toggle' ) ); ?>
add_text( 'slug', array( 'class' => 'text code' ) ); ?>

add_text( 'register', array( 'class' => 'text code' ) ); ?>
add_checkbox( 'theme_compat', array( 'class' => 'itsec-settings-toggle' ) ); ?>
add_text( 'theme_compat_slug', array( 'class' => 'text code' ) ); ?>

add_text( 'post_logout_slug', array( 'class' => 'text code' ) ); ?>