wordpress / latest / hooks / wp_prepare_attachment_for_js.html

apply_filters( 'wp_prepare_attachment_for_js', array $response, WP_Post $attachment, array|false $meta )

Filters the attachment data prepared for JavaScript.

Parameters

$response array
Array of prepared attachment data. @see wp_prepare_attachment_for_js() .
$attachment WP_Post
Attachment object.
$meta array|false
Array of attachment meta data, or false if there is none.

Source

File: wp-includes/media.php. View all references

return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta );

Used By

Used By Description

Changelog

Version Description
3.5.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_prepare_attachment_for_js