rest_prepare_plugin filter-hook . WP 5.5.0
Filters the plugin data for a response.
Usage
add_filter( 'rest_prepare_plugin', 'filter_function_name_7214', 10, 3 ); function filter_function_name_7214( $response, $item, $request ){ // filter... return $response; }
- $response(WP_REST_Response)
- The response object.
- $item(array)
- The plugin item from {@see get_plugin_data()}.
- $request(WP_REST_Request)
- The request object.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
rest_prepare_plugin
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php 595
return apply_filters( 'rest_prepare_plugin', $response, $item, $request );