get_loginpress_page(); $loginpress_page_url = get_permalink( $loginpress_page ); // Generate the redirect url. $loginpress_redirect_url = add_query_arg( array( 'autofocus[panel]' => 'loginpress_panel', 'return' => admin_url( 'index.php' ), 'url' => rawurlencode( $loginpress_page_url ? $loginpress_page_url : '' ), ), admin_url( 'customize.php' ) ); wp_safe_redirect( $loginpress_redirect_url ); } /** * Make sure that the WordPress bootstrap has run before continuing. * * @phpstan-ignore-next-line */ require ABSPATH . '/wp-load.php'; // Redirect to https login if forced to use SSL. if ( force_ssl_admin() && ! is_ssl() ) { if ( isset( $_SERVER['REQUEST_URI'] ) && 0 === strpos( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'http' ) ) { wp_safe_redirect( set_url_scheme( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'https' ) ); exit(); } elseif ( isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) { wp_safe_redirect( 'https://' . sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) . sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); exit(); } } /** * Output the login page header. * * @param string $title Optional. WordPress login Page title to display in the `` element. * Default 'Log In'. * @param string $message Optional. Message to display in header. Default empty. * @param WP_Error $wp_error Optional. The error to pass. Default empty. * @return void */ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { global $error, $interim_login, $action; // Don't index any of these forms. add_action( 'login_head', 'wp_no_robots' ); add_action( 'login_head', 'wp_login_viewport_meta' ); if ( null === $wp_error ) { $wp_error = new WP_Error(); } $login_title = get_bloginfo( 'name', 'display' ); /* translators: Login screen title. 1: Login screen name, 2: Network or site name */ $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); // @codingStandardsIgnoreLine. /** * Filters the title tag content for login page. * * @since 4.9.0 * * @param string $login_title The page title, with extra context added. * @param string $title The original page title. */ $login_title = apply_filters( 'login_title', $login_title, $title ); ?><!DOCTYPE html> <!--[if IE 8]> <html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(IE 8) ]><!--> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <!--<![endif]--> <head> <title><?php echo esc_html( $login_title ); ?> site_name : ''; } else { $login_header_url = __( 'https://wordpress.org/' ); // @codingStandardsIgnoreLine. $login_header_title = __( 'Powered by WordPress' ); // @codingStandardsIgnoreLine. } /** * Filters link URL of the header logo above login form. * * @since 2.1.0 * * @param string $login_header_url Login header logo URL. */ $login_header_url = apply_filters( 'login_headerurl', $login_header_url ); /** * Filters the title attribute of the header logo above login form. * * @since 2.1.0 * * @param string $login_header_title Login header logo title attribute. */ $login_header_title = apply_filters( 'login_headertitle', $login_header_title ); /* * To match the URL/title set above, Multisite sites have the blog name, * while single sites get the header title. */ if ( is_multisite() ) { $login_header_text = get_bloginfo( 'name', 'display' ); } else { $login_header_text = $login_header_title; } ?>

add( 'error', $error ); unset( $error ); } if ( $wp_error->get_error_code() ) { $errors = ''; $messages = ''; foreach ( $wp_error->get_error_codes() as $code ) { $severity = $wp_error->get_error_data( $code ); foreach ( $wp_error->get_error_messages( $code ) as $error_message ) { if ( 'message' === $severity ) { $messages .= ' ' . $error_message . "
\n"; } else { $errors .= ' ' . $error_message . "
\n"; } } } if ( ! empty( $errors ) ) { /** * Filters the error messages displayed above the login form. * * @since 2.1.0 * * @param string $errors Login error message. */ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is escaped by WP_Error. echo '
' . apply_filters( 'login_errors', $errors ) . "
\n"; } if ( ! empty( $messages ) ) { /** * Filters instructional messages displayed above the login form. * * @since 2.5.0 * * @param string $messages Login messages. */ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is escaped by WP_Error. echo '

' . apply_filters( 'login_messages', $messages ) . "

\n"; } } } // End of login_header() /** * Outputs the footer for the login page. * * @since 3.0.5 * * @global bool|string $interim_login Whether interim login modal is being displayed. String 'success' * upon successful login. * * @param string $input_id Which input to auto-focus. * @return void */ function login_footer( $input_id = '' ) { global $interim_login; // Don't allow interim logins to navigate away from the page. if ( ! $interim_login ) { ?>

%s', esc_url( home_url( '/' ) ), sprintf( /* translators: %s: Site title. */ _x( '← Go to %s', 'site' ), // @codingStandardsIgnoreLine. get_bloginfo( 'title', 'display' ) ) ); /** * Filters the "Go to site" link displayed in the login page footer. * * @since 5.7.0 * * @param string $link HTML link to the home URL of the current site. */ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Filter output is escaped. echo apply_filters( 'login_site_html_link', $html_link ); ?>

', '
' ); } ?>
'language-switcher-locales', 'name' => 'wp_lang', 'selected' => determine_locale(), 'show_available_translations' => false, 'explicit_option_en_us' => true, 'languages' => $languages, ); /** * Filters default arguments for the Languages select input on the login screen. * * The arguments get passed to the wp_dropdown_languages() function. * * @since 5.9.0 * * @param array $args Arguments for the Languages select input on the login screen. */ wp_dropdown_languages( apply_filters( 'login_language_dropdown_args', $args ) ); ?>
' . __( 'Please enter your username or email address. You will receive a link to create a new password via email.' ) . '

', $loginpress_login_errors ); // @codingStandardsIgnoreLine. $loginpress_lostpassword_user_login = ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- This is the lost password form. if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- This is the lost password form. $loginpress_lostpassword_user_login = sanitize_text_field( wp_unslash( $_POST['user_login'] ) ); } ?>

' . __( 'Register For This Site' ) . '

', $loginpress_register_errors ); // @codingStandardsIgnoreLine. ?>