On this page
apply_filters( 'wp_prepare_attachment_for_js', array $response, WP_Post $attachment, array|false $meta )
Filters the attachment data prepared for JavaScript.
Parameters
$responsearray-
Array of prepared attachment data. @see wp_prepare_attachment_for_js() .
$attachmentWP_Post-
Attachment object.
$metaarray|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 );
Related
Used By
| Used By | Description |
|---|---|
| wp_prepare_attachment_for_js() wp-includes/media.php | Prepares an attachment post object for JS, where it is expected to be JSON-encoded and fit into an Attachment model. |
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