WPDev.one
Core Function
View Source on Trac ↗

wp_prepare_attachment_for_js()

wp_prepare_attachment_for_js( mixed $attachment )

Prepares an attachment post object for JS, where it is expected

Parameters 1 required

Name / Type Description
(int

| WP_Post) $attachment Attachment ID or object.

Required

Return Value

((array)
(array | void) { Array of attachment details, or void if the parameter does not correspond to an attachment.

Function Information

Since Version
3.5.0
Source File
wp-includes/media.php
Advertisement