Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function save_custom_media_gallery_fields($post, $attachment) {
- if( isset($attachment['custom_link']) ){
- update_post_meta($post['ID'], '_custom_link', $attachment['custom_link']);
- }
- return $post;
- }
- add_filter("attachment_fields_to_save", "save_custom_media_gallery_fields", null , 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement