[wp-trac] [WordPress Trac] #11896: wp_get_attachment_metadata not grabbing some metadata

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 14 20:20:16 UTC 2010


#11896: wp_get_attachment_metadata not grabbing some metadata
--------------------------+-------------------------------------------------
 Reporter:  danielpataki  |       Owner:                            
     Type:  defect (bug)  |      Status:  new                       
 Priority:  normal        |   Milestone:  Unassigned                
Component:  General       |     Version:  2.9.1                     
 Severity:  normal        |    Keywords:  wp_get_attachment_metadata
--------------------------+-------------------------------------------------
 Hello!

 I have been using and developing with Wordpress for years, but this is my
 first bug report, so if I am wrong, or do not use proper etiquette, please
 let me know!

 I created a function to retrieve some of the uploaded images, and I wanted
 to use wp_get_attachment_metadata to grab some of the attachements
 metadata.

 When I uploaded the images I added titles and descriptions and captions
 and whatnot, but I can't seem to retrieve them with this function.

 If I try the following:
 $meta = wp_get_attachment_metadata( $att->ID, true);
 print_r($meta);

 I would expect the caption to be contained in
 $meta['image_meta']['caption']

 I may be wrong because this array has exif data as well, so this variable
 may hold caption data from exif data, and not from wp_posts->post_excerpt?

 In any case, this function does not return any of the image data I
 entered, while based on the name of the function I'm sure it could be
 expected.

 Please see the attached images for the entered image metadata and the
 printed array on the page

 I hope this really is a bug, if not, please excuse me for wasting your
 time.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11896>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list