mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.
Props adamsilverstein, wonderboymusic. Fixes #33450. Built from https://develop.svn.wordpress.org/trunk@34312 git-svn-id: http://core.svn.wordpress.org/trunk@34276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
abefb963e7
commit
c43f72fbfb
@ -62,7 +62,7 @@ $core_actions_post = array(
|
|||||||
'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
|
'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
|
||||||
'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
|
'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
|
||||||
'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
|
'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
|
||||||
'press-this-add-category', 'crop-image',
|
'press-this-add-category', 'crop-image', 'generate-password',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Deprecated
|
// Deprecated
|
||||||
|
@ -3203,3 +3203,12 @@ function wp_ajax_crop_image() {
|
|||||||
|
|
||||||
wp_send_json_success( wp_prepare_attachment_for_js( $attachment_id ) );
|
wp_send_json_success( wp_prepare_attachment_for_js( $attachment_id ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a password via ajax.
|
||||||
|
*
|
||||||
|
* @since 4.3.1
|
||||||
|
*/
|
||||||
|
function wp_ajax_generate_password() {
|
||||||
|
wp_send_json_success( wp_generate_password( 24 ) );
|
||||||
|
}
|
||||||
|
@ -217,6 +217,15 @@
|
|||||||
$cancelButton.on( 'click', function () {
|
$cancelButton.on( 'click', function () {
|
||||||
updateLock = false;
|
updateLock = false;
|
||||||
|
|
||||||
|
// Clear any entered password.
|
||||||
|
$pass1Text.val( '' );
|
||||||
|
|
||||||
|
// Generate a new password.
|
||||||
|
wp.ajax.post( 'generate-password' )
|
||||||
|
.done( function( data ) {
|
||||||
|
$pass1.data( 'pw', data );
|
||||||
|
} );
|
||||||
|
|
||||||
$generateButton.show();
|
$generateButton.show();
|
||||||
$passwordWrapper.hide();
|
$passwordWrapper.hide();
|
||||||
|
|
||||||
|
2
wp-admin/js/user-profile.min.js
vendored
2
wp-admin/js/user-profile.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34311';
|
$wp_version = '4.4-alpha-34312';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user