<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[56008] trunk: Upgrade/Install: Show/hide toggle on password fields.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/56008">56008</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/56008","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>joedolson</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-06-23 23:07:10 +0000 (Fri, 23 Jun 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Upgrade/Install: Show/hide toggle on password fields.
Add a show/hide toggle for new passwords in initial user creation and database access during install and setup process using the same model as on user profiles. Add a new password toggle script. Change setup config table to two columns, matching the install table layout.
Props xmarcos, matt, markjaquith, nazgul, akbigdog, intoxination, rob1n, MichaelH, empireoflight, rmccue, markoheijnen, r0uter, amansurov, bi0xid, DrewAPicture, Narthur, wpnook, markparnell, costdev, clorith, ryokuhi, sabernhardt, bgoewert, ironprogrammer, adeltahri, joedolson, mukesh27, audrasjb, sergeybiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/3534">#3534</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkGruntfilejs">trunk/Gruntfile.js</a></li>
<li><a href="#trunksrcwpadmincssformscss">trunk/src/wp-admin/css/forms.css</a></li>
<li><a href="#trunksrcwpadmincssinstallcss">trunk/src/wp-admin/css/install.css</a></li>
<li><a href="#trunksrcwpadmininstallphp">trunk/src/wp-admin/install.php</a></li>
<li><a href="#trunksrcwpadminsetupconfigphp">trunk/src/wp-admin/setup-config.php</a></li>
<li><a href="#trunksrcwpadminusereditphp">trunk/src/wp-admin/user-edit.php</a></li>
<li><a href="#trunksrcwpadminusernewphp">trunk/src/wp-admin/user-new.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueuesadminpasswordtogglejs">trunk/src/js/_enqueues/admin/password-toggle.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkGruntfilejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/Gruntfile.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/Gruntfile.js 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/Gruntfile.js 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -317,6 +317,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/media.js' ]: [ './src/js/_enqueues/admin/media.js' ],
</span><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/nav-menu.js' ]: [ './src/js/_enqueues/lib/nav-menu.js' ],
</span><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/password-strength-meter.js' ]: [ './src/js/_enqueues/wp/password-strength-meter.js' ],
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ [ WORKING_DIR + 'wp-admin/js/password-toggle.js' ]: [ './src/js/_enqueues/admin/password-toggle.js' ],
</ins><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/plugin-install.js' ]: [ './src/js/_enqueues/admin/plugin-install.js' ],
</span><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/post.js' ]: [ './src/js/_enqueues/admin/post.js' ],
</span><span class="cx" style="display: block; padding: 0 10px"> [ WORKING_DIR + 'wp-admin/js/postbox.js' ]: [ './src/js/_enqueues/admin/postbox.js' ],
</span></span></pre></div>
<a id="trunksrcjs_enqueuesadminpasswordtogglejs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/js/_enqueues/admin/password-toggle.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/admin/password-toggle.js (rev 0)
+++ trunk/src/js/_enqueues/admin/password-toggle.js 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,40 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Adds functionality for password visibility buttons to toggle between text and password input types.
+ *
+ * @since 6.3.0
+ * @output wp-admin/js/password-toggle.js
+ */
+
+( function () {
+ var toggleElements, status, input, icon, label, __ = wp.i18n.__;
+
+ toggleElements = document.querySelectorAll( '.pwd-toggle' );
+
+ toggleElements.forEach( function (toggle) {
+ toggle.classList.remove( 'hide-if-no-js' );
+ toggle.addEventListener( 'click', togglePassword );
+ } );
+
+ function togglePassword() {
+ status = this.getAttribute( 'data-toggle' );
+ input = this.parentElement.children.namedItem( 'pwd' );
+ icon = this.getElementsByClassName( 'dashicons' )[ 0 ];
+ label = this.getElementsByClassName( 'text' )[ 0 ];
+
+ if ( 0 === parseInt( status, 10 ) ) {
+ this.setAttribute( 'data-toggle', 1 );
+ this.setAttribute( 'aria-label', __( 'Hide password' ) );
+ input.setAttribute( 'type', 'text' );
+ label.innerHTML = __( 'Hide' );
+ icon.classList.remove( 'dashicons-visibility' );
+ icon.classList.add( 'dashicons-hidden' );
+ } else {
+ this.setAttribute( 'data-toggle', 0 );
+ this.setAttribute( 'aria-label', __( 'Show password' ) );
+ input.setAttribute( 'type', 'password' );
+ label.innerHTML = __( 'Show' );
+ icon.classList.remove( 'dashicons-hidden' );
+ icon.classList.add( 'dashicons-visibility' );
+ }
+ }
+} )();
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: trunk/src/js/_enqueues/admin/password-toggle.js
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="trunksrcwpadmincssformscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/forms.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/forms.css 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/css/forms.css 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -547,8 +547,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-generate-pw {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 1em;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ position: relative;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-pwd button {
+ height: min-content;
+}
+
+.wp-pwd button.pwd-toggle .dashicons {
+ position: relative;
+ top: 0.25rem;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .wp-pwd {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 1em;
</span><span class="cx" style="display: block; padding: 0 10px"> position: relative;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -640,6 +650,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> opacity: 1;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.password-input-wrapper {
+ display: inline-block;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .password-input-wrapper input {
</span><span class="cx" style="display: block; padding: 0 10px"> font-family: Consolas, Monaco, monospace;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1630,6 +1644,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 8px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .password-input-wrapper {
+ display: block;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> p.search-box {
</span><span class="cx" style="display: block; padding: 0 10px"> float: none;
</span><span class="cx" style="display: block; padding: 0 10px"> position: absolute;
</span></span></pre></div>
<a id="trunksrcwpadmincssinstallcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/install.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/install.css 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/css/install.css 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,7 +131,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 14px;
</span><span class="cx" style="display: block; padding: 0 10px"> text-align: left;
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 10px 20px 10px 0;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- width: 140px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ width: 115px;
</ins><span class="cx" style="display: block; padding: 0 10px"> vertical-align: top;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -145,6 +145,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 11px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.form-table .setup-description {
+ margin: 4px 0 0;
+ line-height: 1.6;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .form-table input {
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 1.33333333;
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 15px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,6 +156,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 3px 5px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-pwd {
+ margin-top: 0;
+}
+
+.form-table .wp-pwd {
+ display: flex;
+ column-gap: 4px;
+}
+
+.form-table .password-input-wrapper {
+ width: 100%;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> input,
</span><span class="cx" style="display: block; padding: 0 10px"> submit {
</span><span class="cx" style="display: block; padding: 0 10px"> font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,7 +179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .form-table input[type=url],
</span><span class="cx" style="display: block; padding: 0 10px"> .form-table input[type=password],
</span><span class="cx" style="display: block; padding: 0 10px"> #pass-strength-result {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- width: 218px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ width: 100%;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .form-table th p {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -286,6 +304,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> box-sizing: border-box;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ #pwd {
+ padding-right: 2.5rem;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .wp-pwd #pass1 {
</span><span class="cx" style="display: block; padding: 0 10px"> padding-right: 50px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadmininstallphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/install.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/install.php 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/install.php 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,12 +140,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <td>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wp-pwd">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="password-input-wrapper">
+ <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
+ <div id="pass-strength-result" aria-live="polite"></div>
+ </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> <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' ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="dashicons dashicons-hidden"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="text"><?php _e( 'Hide' ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div id="pass-strength-result" aria-live="polite"></div>
</del><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <p><span class="description important hide-if-no-js">
</span><span class="cx" style="display: block; padding: 0 10px"> <strong><?php _e( 'Important:' ); ?></strong>
</span></span></pre></div>
<a id="trunksrcwpadminsetupconfigphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/setup-config.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/setup-config.php 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/setup-config.php 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,33 +223,41 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <table class="form-table" role="presentation">
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" /></td>
- <td id="dbhost-desc">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" />
+ <p id="dbhost-desc">
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: localhost */
</span><span class="cx" style="display: block; padding: 0 10px"> printf( __( 'You should be able to get this info from your web host, if %s does not work.' ), '<code>localhost</code>' );
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </td>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </p></td>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> </table>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,6 +268,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
</span><span class="cx" style="display: block; padding: 0 10px"> </form>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_print_scripts( 'password-toggle' );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> case 2:
</span></span></pre></div>
<a id="trunksrcwpadminusereditphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-edit.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-edit.php 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/user-edit.php 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -643,9 +643,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" value=" " /><!-- #24364 workaround -->
</span><span class="cx" style="display: block; padding: 0 10px"> <button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="false"><?php _e( 'Set New Password' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wp-pwd hide-if-js">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="password-input-wrapper">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="password-input-wrapper">
</ins><span class="cx" style="display: block; padding: 0 10px"> <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="new-password" spellcheck="false" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
+ </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="dashicons dashicons-hidden" aria-hidden="true"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="text"><?php _e( 'Hide' ); ?></span>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -654,7 +655,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="dashicons dashicons-no" aria-hidden="true"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="text"><?php _e( 'Cancel' ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
</del><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span></span></pre></div>
<a id="trunksrcwpadminusernewphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-new.php 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-admin/user-new.php 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -570,14 +570,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate password' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wp-pwd">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php $initial_password = wp_generate_password( 24 ); ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="password-input-wrapper">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="password-input-wrapper">
</ins><span class="cx" style="display: block; padding: 0 10px"> <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
+ </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="dashicons dashicons-hidden" aria-hidden="true"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="text"><?php _e( 'Hide' ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
</del><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2023-06-23 20:04:30 UTC (rev 56007)
+++ trunk/src/wp-includes/script-loader.php 2023-06-23 23:07:10 UTC (rev 56008)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1171,6 +1171,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->set_translations( 'password-strength-meter' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scripts->add( 'password-toggle', "/wp-admin/js/password-toggle$suffix.js", array(), false, 1 );
+ $scripts->set_translations( 'password-toggle' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'application-passwords', "/wp-admin/js/application-passwords$suffix.js", array( 'jquery', 'wp-util', 'wp-api-request', 'wp-date', 'wp-i18n', 'wp-hooks' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->set_translations( 'application-passwords' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>