rebase on oct-10-2023
This commit is contained in:
@@ -223,33 +223,41 @@ switch ( $step ) {
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
|
||||
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/></td>
|
||||
<td id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
|
||||
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/>
|
||||
<p id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
|
||||
<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>
|
||||
<td id="uname-desc"><?php _e( 'Your database username.' ); ?></td>
|
||||
<td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" />
|
||||
<p id="uname-desc"><?php _e( 'Your database username.' ); ?></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
|
||||
<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" spellcheck="false" /></td>
|
||||
<td id="pwd-desc"><?php _e( 'Your database password.' ); ?></td>
|
||||
<td>
|
||||
<div class="wp-pwd">
|
||||
<input name="pwd" id="pwd" type="password" class="regular-text" data-reveal="1" aria-describedby="pwd-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" spellcheck="false" />
|
||||
<button type="button" class="button pwd-toggle hide-if-no-js" data-toggle="0" data-start-masked="1" aria-label="<?php esc_attr_e( 'Show password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility"></span>
|
||||
<span class="text"><?php _e( 'Show' ); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<p id="pwd-desc"><?php _e( 'Your database password.' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
|
||||
<td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" /></td>
|
||||
<td id="dbhost-desc">
|
||||
<td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" />
|
||||
<p id="dbhost-desc">
|
||||
<?php
|
||||
/* translators: %s: localhost */
|
||||
printf( __( 'You should be able to get this info from your web host, if %s does not work.' ), '<code>localhost</code>' );
|
||||
?>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
|
||||
<td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" /></td>
|
||||
<td id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
|
||||
<td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" />
|
||||
<p id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
@@ -260,6 +268,7 @@ switch ( $step ) {
|
||||
<p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
|
||||
</form>
|
||||
<?php
|
||||
wp_print_scripts( 'password-toggle' );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -363,7 +372,7 @@ switch ( $step ) {
|
||||
|
||||
$key = 0;
|
||||
foreach ( $config_file as $line_num => $line ) {
|
||||
if ( '$table_prefix =' === substr( $line, 0, 15 ) ) {
|
||||
if ( str_starts_with( $line, '$table_prefix =' ) ) {
|
||||
$config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user