[wp-trac] [WordPress Trac] #33768: Include image_meta in wp_prepare_attachment_for_js response for images
WordPress Trac
noreply at wordpress.org
Mon Sep 7 16:35:23 UTC 2015
#33768: Include image_meta in wp_prepare_attachment_for_js response for images
--------------------------+-----------------------------
Reporter: SteveHoneyNZ | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Currently seems odd that the image_meta array isn't returned in the
response from wp_prepare_attachment_for_js for an image.
The function already calls get_attachment_metadata so the image_meta array
is readily available.
The meta key is already declared in the response array.
All other mime types populate the meta value in the response array in a
similar fashion as my proposal.
I can't see any downside or overhead, and the function becomes much more
powerful, particulaly for gallery implenmenations, as a result.
The addition is just three lines (in wp-includes/media.php #L2835 of
current version).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33768>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list