wp/wp-admin/install.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   138 				</label>
   138 				</label>
   139 			</th>
   139 			</th>
   140 			<td>
   140 			<td>
   141 				<div class="wp-pwd">
   141 				<div class="wp-pwd">
   142 					<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
   142 					<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
   143 					<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
   143 					<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
   144 					<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
   144 					<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
   145 						<span class="dashicons dashicons-hidden"></span>
   145 						<span class="dashicons dashicons-hidden"></span>
   146 						<span class="text"><?php _e( 'Hide' ); ?></span>
   146 						<span class="text"><?php _e( 'Hide' ); ?></span>
   147 					</button>
   147 					</button>
   148 					<div id="pass-strength-result" aria-live="polite"></div>
   148 					<div id="pass-strength-result" aria-live="polite"></div>
   158 				<label for="pass2"><?php _e( 'Repeat Password' ); ?>
   158 				<label for="pass2"><?php _e( 'Repeat Password' ); ?>
   159 					<span class="description"><?php _e( '(required)' ); ?></span>
   159 					<span class="description"><?php _e( '(required)' ); ?></span>
   160 				</label>
   160 				</label>
   161 			</th>
   161 			</th>
   162 			<td>
   162 			<td>
   163 				<input name="admin_password2" type="password" id="pass2" autocomplete="off" />
   163 				<input name="admin_password2" type="password" id="pass2" autocomplete="new-password" />
   164 			</td>
   164 			</td>
   165 		</tr>
   165 		</tr>
   166 		<tr class="pw-weak">
   166 		<tr class="pw-weak">
   167 			<th scope="row"><?php _e( 'Confirm Password' ); ?></th>
   167 			<th scope="row"><?php _e( 'Confirm Password' ); ?></th>
   168 			<td>
   168 			<td>
   356 		?>
   356 		?>
   357 <h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
   357 <h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
   358 <p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
   358 <p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
   359 
   359 
   360 <h2><?php _e( 'Information needed' ); ?></h2>
   360 <h2><?php _e( 'Information needed' ); ?></h2>
   361 <p><?php _e( 'Please provide the following information. Don&#8217;t worry, you can always change these settings later.' ); ?></p>
   361 <p><?php _e( 'Please provide the following information. Do not worry, you can always change these settings later.' ); ?></p>
   362 
   362 
   363 		<?php
   363 		<?php
   364 		display_setup_form();
   364 		display_setup_form();
   365 		break;
   365 		break;
   366 	case 2:
   366 	case 2:
   403 			// TODO: Poka-yoke.
   403 			// TODO: Poka-yoke.
   404 			display_setup_form( __( 'You must provide an email address.' ) );
   404 			display_setup_form( __( 'You must provide an email address.' ) );
   405 			$error = true;
   405 			$error = true;
   406 		} elseif ( ! is_email( $admin_email ) ) {
   406 		} elseif ( ! is_email( $admin_email ) ) {
   407 			// TODO: Poka-yoke.
   407 			// TODO: Poka-yoke.
   408 			display_setup_form( __( 'Sorry, that isn&#8217;t a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
   408 			display_setup_form( __( 'Sorry, that is not a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
   409 			$error = true;
   409 			$error = true;
   410 		}
   410 		}
   411 
   411 
   412 		if ( false === $error ) {
   412 		if ( false === $error ) {
   413 			$wpdb->show_errors();
   413 			$wpdb->show_errors();