I would recommend that you begin by having a look at a question asked more recently here.
The best option would be to create a custom plugin so that the WP core doesn’t get affected. Editing core files is never a good idea, plus you would lose any changes when updating WP.
Related Posts:
- Add custom class to attachment in media library grid mode
- Expanding new Media Uploader in WordPress 3.5
- How to set order for attachment form field?
- Custom attachment field dissapearing
- How to manage attachment relationships for specific posts in WP 3.5+
- Change attachment filename
- How to get attachment file name not attachment URL
- Getting a taxonomy’s thumbnail url
- Check if post has attachments (not image)
- How can I append custom data to images in the editor?
- Applying automatic link class to images embedded to posts
- Get all posts (of any post type) an attachment is used in
- How to single click to download image in single post
- delete attachment from front end
- URL rewrite with add_rewrite_rule and attachment_id
- How to set author for post AND post attachments
- How can I display custom fields value from attachment media?
- Add column for attachment file size
- how to test for attached image
- Unable to upload specific .zip file type via frontend in WordPress 4.0
- Making images from single.php pointing to an attachment .php template
- Add_Filter example for wp_get_attachment_link
- Can i hide the attachments from media which I uploaded from front end?
- wp_get_attachment_image_src always returns false
- Exact image sizes
- attachment url rewrite
- Get the size (size in Kb or MB) of an featured image?
- How to get all attachment image from post ?? WordPress
- Automatically delete attachments and posts [closed]
- Get attachment file link
- How to grab the first two image attachments from a post?
- wp_insert_post featured image from library
- How to delete orphan attachments?
- the_content() behavior on attachment.php versus single.php
- Make alt text required when setting a featured image
- Disable edit media attachments?
- Getting ID from ajax response of async-upload.php
- Post Auto Draft Issue
- Getting attachment images is cloning some of them
- How to make a customized “Create Gallery” tab in the ‘Add Media’ window?
- post_author for wp_insert_attachment
- Detach an image from a page using php
- Get the path of the first attached media (single.php)
- Ordering of gallery images without using shortcode in theme
- Adding width and height to wp_get_attachment_image_src
- Get the bare URL for an attachment
- custom admin thumbnail for videos, not getting post’s id?
- Don’t show attachments if they are inserted in post
- Control attachments menu order with jQuery Sortable
- Media library quick/inline edit
- Email Attachment from Form Submit
- Check what attached image size is used
- Clean up images, delete unused image sizes attached to a post type
- Custom image sizes add to metadata
- How do you create an attachment ID with Ajax submit? No page refresh
- filter get_children to return all mime types EXCEPT ‘x’
- Links to my uploads went crazy
- How to get $attachment->ID in custom functions
- How to add a caption to an image attachment in a file list?
- All attachment pages give 404
- i’m trying to get all my media query attachments via ajax in wordpress
- Unable to get wp_get_attachment_url to show
- Get Attachment Image Class by attachment id
- has_excerpt yields true but no post_excerpt when retrieved
- Automatically deactivate link for attachments
- Hiding or removing file extension displayed in HTML on attachment page
- After changing permalink structure, How to redirect attachment url to old parent post url
- Possible to add “Even/Odd Classes” to image attachments via wp_get_attachment_image?
- Getting attachment post using wp_get_attachment_link
- wp_mail Allow Remote Attachments from CDN
- Get all image in media Gallery with alt/title?
- Custom field in media library not saving, selected() function not adding “selected” to select list input type
- How is it possible that a gallery doesn’t have attachment ids?
- Were attachment media settings removed from WordPress?
- How to identify and delete all the images/pdf’s which are not assigned to any post/custom-post/page and also which are repeated
- Media item permalink goes to source file instead of attachment.php
- Filter not applied to all image sizes
- Zip a file and add as attachment
- Nothing found in uploads folder after wp_insert_attachment
- Remove post with attachments hook
- Setting an image as post header (not featured image)
- PHPMailer – Uploading a file
- How to restrict users to only access their own media files in wordpress
- wp_mail doen’t send mails whit attachment
- Attachment file display link text
- When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?
- Get video attachment ID and display length
- List attachments of a page
- Importing Attachments with No Extension
- Is there a way to add Reattach and Unattach links in image gallery?
- Post images not displaying as attachments
- Move caption in on attachment page
- How to retrieve images contained in a post
- Showing the attachment for a page?
- How can we select attachements based on Caption?
- Gallery Thumbnail Layout Template
- Calling a javascript function in post edit page after attaching something to post
- Custom Fields, Media uploader, Attachments
- No attachments on contact form 7
- wp_mail attachment not working in wordpress