wp_prepare_attachment_for_js WordPress Filter Hook
This hook is used to filter the attachment data before it is passed to the wp_prepare_attachment_for_js() function. This allows for custom data to be added or removed from the attachment data before it is processed by the wp_prepare_attachment_for_js() function.
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
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |