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 |
|---|---|
| 273 | |
| 274 | /** |
| 275 | * Fires when an application password is deleted. |
| 276 | * |
| 277 | * @since 5.6.0 |
| 278 | * |
| 279 | * @param int $user_id The user ID. |
| 280 | * @param array $item The data about the application password. |
| 281 | */ |
| 282 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 283 | |
| 284 | return true; |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | return new WP_Error( 'application_password_not_found', __( 'Could not find an application password with that id.' ) ); |
| 289 | } |
| 290 | |
| 291 | /** |
| Line | Code |
| 302 | if ( $passwords ) { |
| 303 | $saved = static::set_user_application_passwords( $user_id, array() ); |
| 304 | |
| 305 | if ( ! $saved ) { |
| 306 | return new WP_Error( 'db_error', __( 'Could not delete application passwords.' ) ); |
| 307 | } |
| 308 | |
| 309 | foreach ( $passwords as $item ) { |
| 310 | /** This action is documented in wp-includes/class-wp-application-passwords.php */ |
| 311 | do_action( 'wp_delete_application_password', $user_id, $item ); |
| 312 | } |
| 313 | |
| 314 | return count( $passwords ); |
| 315 | } |
| 316 | |
| 317 | return 0; |
| 318 | } |
| 319 | |
| 320 | /** |