else { // Some parts of this script use the main login form to display a message.
if ( isset( $_GET['loggedout'
] ) &&
$_GET['loggedout'
] ) { $errors->
add( 'loggedout',
__( 'You are now logged out.'
), 'message'
);
} elseif ( isset( $_GET['registration'
] ) && 'disabled' ===
$_GET['registration'
] ) { $errors->
add( 'registerdisabled',
__( '<strong>Error:</strong> User registration is currently not allowed.'
) );
} elseif ( str_contains( $redirect_to, 'about.php?updated'
) ) { $errors->
add( 'updated',
__( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.'
), 'message'
);
} elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED ===
$action ) { $errors->
add( 'enter_recovery_mode',
__( 'Recovery Mode Initialized. Please log in to continue.'
), 'message'
);
} elseif ( isset( $_GET['redirect_to'
] ) &&
str_contains( $_GET['redirect_to'
], 'wp-admin/authorize-application.php'
) ) { $query_component =
wp_parse_url( $_GET['redirect_to'
], PHP_URL_QUERY
);
$query = array
();
if ( $query_component ) { parse_str( $query_component,
$query );
} if ( !
empty( $query['app_name'
] ) ) { /* translators: 1: Website name, 2: Application name. */
$message =
sprintf( 'Please log in to %1$s to authorize %2$s to connect to your account.',
get_bloginfo( 'name', 'display'
), '<strong>' .
esc_html( $query['app_name'
] ) . '</strong>'
);
} else { /* translators: %s: Website name. */
$message =
sprintf( 'Please log in to %s to proceed with authorization.',
get_bloginfo( 'name', 'display'
) );
}