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.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More