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 |
---|---|
264 | /** |
265 | * Fires after a single application password is completely created or updated via the REST API. |
266 | * |
267 | * @since 5.6.0 |
268 | * |
269 | * @param array $item Inserted or updated password item. |
270 | * @param WP_REST_Request $request Request object. |
271 | * @param bool $creating True when creating an application password, false when updating. |
272 | */ |
273 | do_action( 'rest_after_insert_application_password', $item, $request, true ); |
274 |
|
275 | $request->set_param( 'context', 'edit' ); |
276 | $response = $this->prepare_item_for_response( $item, $request ); |
277 |
|
278 | $response->set_status( 201 ); |
279 | $response->header( 'Location', $response->get_links()['self'][0]['href'] ); |
280 |
|
281 | return $response; |
282 | } |
Line | Code |
343 | $fields_update = $this->update_additional_fields_for_object( $item, $request ); |
344 |
|
345 | if ( is_wp_error( $fields_update ) ) { |
346 | return $fields_update; |
347 | } |
348 |
|
349 | $item = WP_Application_Passwords::get_user_application_password( $user->ID, $item['uuid'] ); |
350 |
|
351 | /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php */ |
352 | do_action( 'rest_after_insert_application_password', $item, $request, false ); |
353 |
|
354 | $request->set_param( 'context', 'edit' ); |
355 | return $this->prepare_item_for_response( $item, $request ); |
356 | } |
357 |
|
358 | /** |
359 | * Checks if a given request has access to delete all application passwords for a user. |
360 | * |
361 | * @since 5.6.0 |