Skip to content

Commit faac282

Browse files
committed
Upgrade/Install: Use "placeholder" for example values in setup-config.php.
During install, the user is prompted for database connection settings. Inputs for the database name, username, and password will most likely be changed from the examples given, but these example values are presented as the input's `value` property. This required the user to clear the current value before entering their own. This change moves the example values for these fields to the `placeholder` property. Props oliverstapelfeldt, audrasjb, krupalpanchal, sabernhardt. Fixes #56365. git-svn-id: https://develop.svn.wordpress.org/trunk@54231 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a2faa0c commit faac282

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-admin/setup-config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,17 @@ function setup_config_display_header( $body_classes = array() ) {
213213
<table class="form-table" role="presentation">
214214
<tr>
215215
<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
216-
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" value="wordpress"<?php echo $autofocus; ?>/></td>
216+
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/></td>
217217
<td id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
218218
</tr>
219219
<tr>
220220
<th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
221-
<td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
221+
<td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
222222
<td id="uname-desc"><?php _e( 'Your database username.' ); ?></td>
223223
</tr>
224224
<tr>
225225
<th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
226-
<td><input name="pwd" id="pwd" type="text" aria-describedby="pwd-desc" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td>
226+
<td><input name="pwd" id="pwd" type="text" aria-describedby="pwd-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td>
227227
<td id="pwd-desc"><?php _e( 'Your database password.' ); ?></td>
228228
</tr>
229229
<tr>

0 commit comments

Comments
 (0)