Action hook 'wp_authorize_application_password_form_approved_no_js'

in WP Core File wp-admin/authorize-application.php at line 236

View Source

wp_authorize_application_password_form_approved_no_js

Action Hook
Description
Fires in the Authorize Application Password new password section in the no-JS version. In most cases, this should be used in combination with the {@see 'wp_application_passwords_approve_app_request_success'} action to ensure that both the JS and no-JS variants are handled.

Hook Information

File Location wp-admin/authorize-application.php View on GitHub
Hook Type Action
Line Number 236

Hook Parameters

Type Name Description
string $new_password The newly generated application password.
array $request The array of request data. All arguments are optional and may be empty.
WP_User $user The user authorizing the application.

Usage Examples

Basic Usage
<?php
// Hook into wp_authorize_application_password_form_approved_no_js
add_action('wp_authorize_application_password_form_approved_no_js', 'my_custom_function', 10, 3);

function my_custom_function($new_password, $request, $user) {
    // Your custom code here
}

Source Code Context

wp-admin/authorize-application.php:236 - How this hook is used in WordPress core
<?php
 231  			 *
 232  			 * @param string  $new_password The newly generated application password.
 233  			 * @param array   $request      The array of request data. All arguments are optional and may be empty.
 234  			 * @param WP_User $user         The user authorizing the application.
 235  			 */
 236  			do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user );
 237  		else :
 238  			?>
 239  			<form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap">
 240  				<?php wp_nonce_field( 'authorize_application_password' ); ?>
 241  				<input type="hidden" name="action" value="authorize_application_password" />

PHP Documentation

<?php
/**
			 * Fires in the Authorize Application Password new password section in the no-JS version.
			 *
			 * In most cases, this should be used in combination with the {@see 'wp_application_passwords_approve_app_request_success'}
			 * action to ensure that both the JS and no-JS variants are handled.
			 *
			 * @since 5.6.0
			 * @since 5.6.1 Corrected action name and signature.
			 *
			 * @param string  $new_password The newly generated application password.
			 * @param array   $request      The array of request data. All arguments are optional and may be empty.
			 * @param WP_User $user         The user authorizing the application.
			 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-admin/authorize-application.php
Related Hooks

Related hooks will be displayed here in future updates.