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 |
---|---|
206 | /** |
207 | * Fires after a single application password is completely created or updated via the REST API. |
208 | * |
209 | * @since 5.6.0 |
210 | * |
211 | * @param array $item Inserted or updated password item. |
212 | * @param WP_REST_Request $request Request object. |
213 | * @param bool $creating True when creating an application password, false when updating. |
214 | */ |
215 | do_action( 'rest_after_insert_application_password', $item, $request, true ); |
216 |
|
217 | $request->set_param( 'context', 'edit' ); |
218 | $response = $this->prepare_item_for_response( $item, $request ); |
219 |
|
220 | $response->set_status( 201 ); |
221 | $response->header( 'Location', $response->get_links()['self'][0]['href'] ); |
222 |
|
223 | return $response; |
224 | } |
Line | Code |
271 | $fields_update = $this->update_additional_fields_for_object( $item, $request ); |
272 |
|
273 | if ( is_wp_error( $fields_update ) ) { |
274 | return $fields_update; |
275 | } |
276 |
|
277 | $item = WP_Application_Passwords::get_user_application_password( $user->ID, $item['uuid'] ); |
278 |
|
279 | /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php */ |
280 | do_action( 'rest_after_insert_application_password', $item, $request, false ); |
281 |
|
282 | $request->set_param( 'context', 'edit' ); |
283 | return $this->prepare_item_for_response( $item, $request ); |
284 | } |
285 |
|
286 | /** |
287 | * Checks if a given request has access to delete all application passwords. |
288 | * |
289 | * @since 5.6.0 |