[wp-trac] [WordPress Trac] #32965: Add new Credit field to media attachment details

WordPress Trac noreply at wordpress.org
Mon Sep 7 16:04:09 UTC 2015


#32965: Add new Credit field to media attachment details
-------------------------+------------------------------
 Reporter:  mcuomo2013   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by SteveHoneyNZ):

 I'd agree that giving more prominence to a credit field is generally a
 good move as authors and particularly photographers are more and more
 conscious of attribution, copyright etc.

 If this info has already been added to the IPTC profile of the image (in
 Lightroom, Photoshop etc), then it is imported to the WordPress attachment
 metadata image_meta array already
 (https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata
 for reference).

 As such in the demonstration plugin you provided you'd want to be
 populating the form field with, and setting the value of, the attachment
 metadata:

 {{{
 $metadata = wp_get_attachment_metadata( $post->ID );
         if ( isset( $metadata['image_meta']['credit'] ) ) {
                 $field_value = $metadata['image_meta']['credit'];
         }
 }}}

 Another considerations is you'd also need to add the field to the single
 post edit view for the image (now normally accessed through the "Edit more
 details" link).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32965#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list