wp_prepare_attachment_for_js


wp_prepare_attachment_for_js ( $attachment )

Parameters:
  • (int|WP_Post) $attachment Attachment ID or object.
Returns:
  • (array|void) Array of attachment details.
Defined at:

Description

Prepares an attachment post object for JS, where it is expected to be JSON-encoded and fit into an Attachment model.

Related Functions

wp_prepare_themes_for_js, wp_prepare_revisions_for_js, wp_delete_attachment_files, prepend_attachment, wp_get_attachment_url

Top Google Results

User discussions

wpseek mobile