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 |
|---|---|
| 380 | |
| 381 | /** |
| 382 | * Fires when an application password is deleted. |
| 383 | * |
| 384 | * @since 5.6.0 |
| 385 | * |
| 386 | * @param int $user_id The user ID. |
| 387 | * @param array $item The data about the application password. |
| 388 | */ |
| 389 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 390 | |
| 391 | return true; |
| 392 | } |
| 393 | } |
| 394 | |
| 395 | return new WP_Error( 'application_password_not_found', __( 'Could not find an application password with that id.' ) ); |
| 396 | } |
| 397 | |
| 398 | /** |
| Line | Code |
| 409 | if ( $passwords ) { |
| 410 | $saved = static::set_user_application_passwords( $user_id, array() ); |
| 411 | |
| 412 | if ( ! $saved ) { |
| 413 | return new WP_Error( 'db_error', __( 'Could not delete application passwords.' ) ); |
| 414 | } |
| 415 | |
| 416 | foreach ( $passwords as $item ) { |
| 417 | /** This action is documented in wp-includes/class-wp-application-passwords.php */ |
| 418 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 419 | } |
| 420 | |
| 421 | return count( $passwords ); |
| 422 | } |
| 423 | |
| 424 | return 0; |
| 425 | } |
| 426 | |
| 427 | /** |