rest_prepare_application_password filter-hookWP 5.6.0

Filters the REST API response for an application password.

Usage

add_filter( 'rest_prepare_application_password', 'wp_kama_rest_prepare_application_password_filter', 10, 3 );

/**
 * Function for `rest_prepare_application_password` filter-hook.
 * 
 * @param WP_REST_Response $response The response object.
 * @param array            $item     The application password array.
 * @param WP_REST_Request  $request  The request object.
 *
 * @return WP_REST_Response
 */
function wp_kama_rest_prepare_application_password_filter( $response, $item, $request ){

	// filter...
	return $response;
}
$response(WP_REST_Response)
The response object.
$item(array)
The application password array.
$request(WP_REST_Request)
The request object.

Changelog

Since 5.6.0 Introduced.

Where the hook is called

WP_REST_Application_Passwords_Controller::prepare_item_for_response()
rest_prepare_application_password
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 646
return apply_filters( 'rest_prepare_application_password', $response, $item, $request );

Where the hook is used in WordPress

Usage not found.