mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Coding Standards: Use Yoda conditions in some wp-admin files.
Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan. Fixes #44365, #48455. git-svn-id: https://develop.svn.wordpress.org/trunk@47218 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -369,7 +369,7 @@ switch ( $step ) {
|
||||
// TODO: Poka-yoke.
|
||||
display_setup_form( __( 'Please provide a valid username.' ) );
|
||||
$error = true;
|
||||
} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
|
||||
} elseif ( sanitize_user( $user_name, true ) != $user_name ) {
|
||||
display_setup_form( __( 'The username you provided has invalid characters.' ) );
|
||||
$error = true;
|
||||
} elseif ( $admin_password != $admin_password_check ) {
|
||||
@@ -386,7 +386,7 @@ switch ( $step ) {
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if ( $error === false ) {
|
||||
if ( false === $error ) {
|
||||
$wpdb->show_errors();
|
||||
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user