Show copyright in gallery

Posted in: Newspaper
Post count: 217

Hi,

I want to show the content of an existing copyright field (via functions.php added in the media uploader) in the gallery, like the description and the caption. How can I do this?

That’s the code of the copyright field…

/**
* Add Photographer Name and URL fields to media uploader
*
* @param $form_fields array, fields to include in attachment form
* @param $post object, attachment record in database
* @return $form_fields, modified form fields
*/

function be_attachment_field_credit( $form_fields, $post ) {
$form_fields[‘be-photographer-name’] = array(
‘label’ => ‘Copyright’,
‘input’ => ‘text’,
‘value’ => get_post_meta( $post->ID, ‘be_photographer_name’, true ),
);
return $form_fields;
}

add_filter( ‘attachment_fields_to_edit’, ‘be_attachment_field_credit’, 10, 2 );

/**
* Save values of Photographer Name and URL in media uploader
*
* @param $post array, the post data for database
* @param $attachment array, attachment fields from $_POST form
* @return $post array, modified post data
*/

function be_attachment_field_credit_save( $post, $attachment ) {
if( isset( $attachment[‘be-photographer-name’] ) )
update_post_meta( $post[‘ID’], ‘be_photographer_name’, $attachment[‘be-photographer-name’] );

return $post;
}

add_filter( ‘attachment_fields_to_save’, ‘be_attachment_field_credit_save’, 10, 2 );

Post count: 35

Would also be interested as this would be a nice solution to credit photographers.

Post count: 6600

Hi,

Unfortunately the time doesn’t allow me to configure this for you.
You can use the image description or caption for photograph credits or you can always get a freelancer from sites like: http://studio.envato.com/ to configure the photograph copyright filed for you.

Thnaks

Post count: 80

I too would like to see this feature, but in Newsmag please. It is important to the media community and publishing in general. Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.