Skip to content

Commit e1e7e88

Browse files
authored
Merge branch 'develop' into auth-fix
2 parents 1e49c96 + 989f2f8 commit e1e7e88

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

wp-admin/css/key-pair.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
margin-top: 1px;
2929
}
3030

31-
.new-key-pair-token kbd {
31+
.input-select {
3232
display: block;
33-
margin-bottom: 1.5em;
34-
overflow-wrap: break-word;
35-
padding: 1em;
33+
font-family: monospace;
34+
margin: .6em 0 1.2em;
35+
width: 100%;
3636
}
3737

3838
input[name=new_token_api_secret] {
3939
width: 100%;
4040
margin-bottom: 1.2em;
41-
}
41+
}

wp-admin/js/key-pair.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@
155155
}
156156
} );
157157

158+
$( document ).on( 'click', '.input-select', function() {
159+
$( this ).select();
160+
} );
161+
158162
$( document ).on( 'click', '.key-pair-modal-dismiss', function( e ) {
159163
e.preventDefault();
160164

wp-includes/rest-api/auth/class-wp-rest-key-pair.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ public function template_new_key_pair() {
684684
printf(
685685
/* translators: %s: key-pair api_secret */
686686
esc_html_x( 'Your new API secret password is: %s', 'API key-pair', 'jwt-auth' ),
687-
'<kbd>{{ data.api_secret }}</kbd>'
687+
'<input type="text" value="{{ data.api_secret }}" class="input-select" />'
688688
);
689689
?>
690690
</div>
@@ -741,14 +741,14 @@ public function template_new_token_key_pair() {
741741
printf(
742742
/* translators: %s: JSON Web Token */
743743
esc_html_x( 'Your new access token is: %s', 'Access Token', 'jwt-auth' ),
744-
'<kbd>{{ data.access_token }}</kbd>'
744+
'<input type="text" value="{{ data.access_token }}" class="input-select" />'
745745
);
746746
?>
747747
<?php
748748
printf(
749749
/* translators: %s: JSON Web Token */
750750
esc_html_x( 'Your new refresh token is: %s', 'Refresh Token', 'jwt-auth' ),
751-
'<kbd>{{ data.refresh_token }}</kbd>'
751+
'<input type="text" value="{{ data.refresh_token }}" class="input-select" />'
752752
);
753753
?>
754754
<p><?php esc_attr_e( 'Be sure to save these JSON Web Tokens in a safe location, you will not be able to retrieve them ever again. Once you click dismiss they\'re gone forever.', 'jwt-auth' ); ?></p>

0 commit comments

Comments
 (0)