rest_pre_insert_application_password
Filter HookDescription
Filters an application password before it is inserted via the REST API.Hook Information
File Location |
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php
View on GitHub
|
Hook Type | Filter |
Line Number | 594 |
Hook Parameters
Type | Name | Description |
---|---|---|
stdClass
|
$prepared
|
An object representing a single application password prepared for inserting or updating the database. |
WP_REST_Request
|
$request
|
Request object. |
Usage Examples
Basic Usage
<?php
// Hook into rest_pre_insert_application_password
add_filter('rest_pre_insert_application_password', 'my_custom_filter', 10, 2);
function my_custom_filter($prepared, $request) {
// Your custom filtering logic here
return $prepared;
}
Source Code Context
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php:594
- How this hook is used in WordPress core
<?php
589 * @since 5.6.0
590 *
591 * @param stdClass $prepared An object representing a single application password prepared for inserting or updating the database.
592 * @param WP_REST_Request $request Request object.
593 */
594 return apply_filters( 'rest_pre_insert_application_password', $prepared, $request );
595 }
596
597 /**
598 * Prepares the application password for the REST response.
599 *
PHP Documentation
<?php
/**
* Filters an application password before it is inserted via the REST API.
*
* @since 5.6.0
*
* @param stdClass $prepared An object representing a single application password prepared for inserting or updating the database.
* @param WP_REST_Request $request Request object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php
Related Hooks
Related hooks will be displayed here in future updates.