Filter hook 'rest_prepare_status'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php at line 285

Description

Filters a post status returned from the REST API. Allows modification of the status data right before it is returned.

Occurrences

Filename Line Number
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php 285

Parameters

Type Name Description
WP_REST_Response $response The response object.
object $status The original post status object.
WP_REST_Request $request Request used to generate the response.

PHP Doc

/**
		 * Filters a post status returned from the REST API.
		 *
		 * Allows modification of the status data right before it is returned.
		 *
		 * @since 4.7.0
		 *
		 * @param WP_REST_Response $response The response object.
		 * @param object           $status   The original post status object.
		 * @param WP_REST_Request  $request  Request used to generate the response.
		 */