wp_prepare_attachment_for_js filter-hook . WP 3.5.0
Filters the attachment data prepared for JavaScript.
Usage
add_filter( 'wp_prepare_attachment_for_js', 'filter_function_name_8923', 10, 3 ); function filter_function_name_8923( $response, $attachment, $meta ){ // filter... return $response; }
- $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.
Changelog
Since 3.5.0 | Introduced. |
Where the hook is called
wp-includes/media.php 4048
return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta );