Uma área de pesquisa sobre o WordPress para devs e autores do tema



rest_prepare_attachment ›

Desde4.7.0
Obsoleton/a
apply_filters( 'rest_prepare_attachment', $response, $post, $request )
Parâmetros: (3)
  • (WP_REST_Response) $response The response object.
    Required: Yes
  • (WP_Post) $post The original attachment post.
    Required: Yes
  • (WP_REST_Request) $request Request used to generate the response.
    Required: Yes
Definido em:
Codex:

Filters an attachment returned from the REST API.

Allows modification of the attachment right before it is returned.





Fonte

return apply_filters( 'rest_prepare_attachment', $response, $post, $request );