WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 354 | |
| 355 | /** |
| 356 | * Fires when an application password is deleted. |
| 357 | * |
| 358 | * @since 5.6.0 |
| 359 | * |
| 360 | * @param int $user_id The user ID. |
| 361 | * @param array $item The data about the application password. |
| 362 | */ |
| 363 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 364 | |
| 365 | return true; |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | return new WP_Error( 'application_password_not_found', __( 'Could not find an application password with that id.' ) ); |
| 370 | } |
| 371 | |
| 372 | /** |
| Line | Code |
| 383 | if ( $passwords ) { |
| 384 | $saved = static::set_user_application_passwords( $user_id, array() ); |
| 385 | |
| 386 | if ( ! $saved ) { |
| 387 | return new WP_Error( 'db_error', __( 'Could not delete application passwords.' ) ); |
| 388 | } |
| 389 | |
| 390 | foreach ( $passwords as $item ) { |
| 391 | /** This action is documented in wp-includes/class-wp-application-passwords.php */ |
| 392 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 393 | } |
| 394 | |
| 395 | return count( $passwords ); |
| 396 | } |
| 397 | |
| 398 | return 0; |
| 399 | } |
| 400 | |
| 401 | /** |