Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function custom_media_gallery_fields($form_fields, $post) {
- $form_fields["custom_link"] = array(
- "label" => __("External URL"),
- "input" => "text",
- "value" => get_post_meta($post->ID, "_custom_link", true), // save as meta
- "helps" => __("Your external link.")
- );
- unset( $form_fields['url'] ); // [optional] remove original URL field
- return $form_fields;
- }
- add_filter("attachment_fields_to_edit", "custom_media_gallery_fields", null, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement