rest_pre_insert_application_password
Filters an application password before it is inserted via the REST API.
Usage
add_filter( 'rest_pre_insert_application_password', 'wp_kama_rest_pre_insert_application_password_filter', 10, 2 );
/**
* Function for `rest_pre_insert_application_password` filter-hook.
*
* @param stdClass $prepared An object representing a single application password prepared for inserting or updating the database.
* @param WP_REST_Request $request Request object.
*
* @return stdClass
*/
function wp_kama_rest_pre_insert_application_password_filter( $prepared, $request ){
// filter...
return $prepared;
}
- $prepared(stdClass)
- An object representing a single application password prepared for inserting or updating the database.
- $request(WP_REST_Request)
- Request object.
Changelog
| Since 5.6.0 | Introduced. |
Where the hook is called
rest_pre_insert_application_password
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 594
return apply_filters( 'rest_pre_insert_application_password', $prepared, $request );