Filter hook 'rest_prepare_application_password'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php at line 646

View Source

rest_prepare_application_password

Filter Hook
Description
Filters the REST API response for an application password.

Hook Information

File Location wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php View on GitHub
Hook Type Filter
Line Number 646

Hook Parameters

Type Name Description
WP_REST_Response $response The response object.
array $item The application password array.
WP_REST_Request $request The request object.

Usage Examples

Basic Usage
<?php
// Hook into rest_prepare_application_password
add_filter('rest_prepare_application_password', 'my_custom_filter', 10, 3);

function my_custom_filter($response, $item, $request) {
    // Your custom filtering logic here
    return $response;
}

Source Code Context

wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php:646 - How this hook is used in WordPress core
<?php
 641  		 *
 642  		 * @param WP_REST_Response $response The response object.
 643  		 * @param array            $item     The application password array.
 644  		 * @param WP_REST_Request  $request  The request object.
 645  		 */
 646  		return apply_filters( 'rest_prepare_application_password', $response, $item, $request );
 647  	}
 648  
 649  	/**
 650  	 * Prepares links for the request.
 651  	 *

PHP Documentation

<?php
/**
		 * Filters the REST API response for an application password.
		 *
		 * @since 5.6.0
		 *
		 * @param WP_REST_Response $response The response object.
		 * @param array            $item     The application password array.
		 * @param WP_REST_Request  $request  The request object.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php
Related Hooks

Related hooks will be displayed here in future updates.