Make WordPress Core

Changeset 54231


Ignore:
Timestamp:
09/19/2022 11:53:09 PM (2 years ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r53812 r54231  
    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>
Note: See TracChangeset for help on using the changeset viewer.