'Copyright',
'input' => 'text',
'value' => get_post_meta($post->ID, 'copyright', true)
);
$form_fields['terms'] = array(
'label' => 'Terms &
Conditions',
'input' => 'text',
'value' => get_post_meta($post->ID, 'terms', true)
);
return $form_fields;
}
/**
* Save values of Copyright and Terms & Condition 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
*/
public static function canto_be_attachment_field_credit_save($post, $attachment)
{
if (isset($attachment['copyright'])) {
update_post_meta($post['ID'], 'copyright', $attachment['copyright']);
}
if (isset($attachment['terms'])) {
update_post_meta($post['ID'], 'terms', esc_url($attachment['terms']));
}
return $post;
}
public function get_placeholder_html() {
$html = '