Perhaps a bit quick and dirty, but this should work:
function media_library_hide_dlm_downloads($where) {
if(isset($_POST['action']) && ( $_POST['action'] == 'query-attachments')) {
$where .= ' AND guid NOT LIKE "%wp-content/uploads/dlm_downloads%"';
}
return $where;
}
add_filter('posts_where', 'media_library_hide_dlm_downloads');
Read more about the posts_where filter.
Related Posts:
- How to add HTML into error message
- Function image_send_to_editor returns emty title tag
- Zip all (original) images from media gallery
- Upload Multiple Files With media_handle_upload
- Remote upload file to server B
- How do I use the WP image functions in a page template?
- How to get the image EXIF date/time and use it for the WP post date/time
- Removing default image size list in Media Box
- delete uploaded file
- How to reduce original image quality on upload?
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- How to save Uploaded image in custom option panel?
- Max file size not updating
- Allowing SVG uploads in media uploader without plug-in
- Custom image size in Media Dropdown
- Images uploaded using media uploader are appearing upside down
- How can I enable uploading excel files?
- How to display more audio file ID3 tags in WordPress
- WordPress upload_mimes not working for front-end uploads of 3D files
- Restore Image Title Text
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- Disable auto-resizing of uploaded images, but only for certain filename
- Restrict media upload size by format
- Updating Media Published Date When Parent Post Is Modified in WordPress
- When sale price is 0.00 show only regular price
- WordPress converts media extention URL automatically to video player
- Set spesific size of featured images
- Can’t generate thumbnail images
- WordPress Automatic Filename Changer
- Limit dimensions of “Full” size images
- How to stop media_sideload_image from running when deleting a post?
- Possible to hook into Media Library preview File column and use a custom image?
- Can’t locate custom image sizes defined by child theme
- Function that prevents users from uploading photos more photos
- Convert all uploaded PNG files to PNG-8 format
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- how can I change all wordpress media file url to custom cdn url?
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Put images in the media from url functions
- How to upload 3 attachments to current post?
- Serving cache from multiple domain names
- restrict uploaded image size and fixed image display size
- Figure inlined width trigger distorted layout
- wp_upload_bits – define (sub)folder / (sub)directory before filename?
- Create input select image URL?
- Rename file after title , one small problem
- When the WP_EDITOR button is pressed, the user is prompted to select a photo from their device
- How to overwrite image if it already exists – WordPress, Gravity form
- Convert Image to Webp on upload without plugin
- stop resize button for wordpress media
- Uploading images via ACF update_field function
- How to Protect Uploads, if User is not Logged In?
- Missing feature image link function
- What’s the difference between home_url() and site_url()
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- How to customize the_archive_title()?
- remove empty paragraphs from the_content?
- What is the “with_front” rewrite key?
- Why use if function_exists?
- How to override parent functions in child themes?
- How to Fix HTTP Error When Uploading Images?
- wp_enqueue_script was called incorrectly
- Add multiple custom fields to the general settings page
- Ajax call always returns 0
- 400 bad request on admin-ajax.php only using wp_enqueue_scripts action hook
- How long does a deprecated function live in core?
- Solution to render Shortcodes in Admin Editor
- How to add a data attribute to a WordPress menu item
- How to add new tab to media upload manager with custom set of images?
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- remove_action on after_setup_theme not working from child theme
- plugins_url vs plugin_dir_url
- Remove type attribute from script and style tags added by WordPress
- How to run a function every 5 minutes?
- Add “upload media” button in meta box field
- Extend Media Library
- Best way of passing PHP variable between partials?
- How Can I Add the “Insert From URL” Tab to a Custom 3.5 Media Uploader?
- How to display custom field in woocommerce orders in admin panel?
- How to make “Upload files”selected by default in Insert Media?
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Adding fields to the “Add New User” screen in the dashboard
- Issues with title-tag and document_title_parts
- How do I get the current edit page ID in the admin?
- How to check if a user exists by a given id
- Why isn’t is_page working when I put it in the functions.php file?
- “Add Media” button in custom plugin
- Add tags to the section via functions.php
- Add image size if page template
- How to create a custom order status in woocommerce!
- Remove Actions/Filters added via Anonymous Functions
- Adding a second email address to a completed order in WooCommerce [closed]
- How to load parent_theme functions.php before child_theme?
- How to load scripts/styles specific for a page
- Upload images to remote server
- Programatically add options to “add new” custom field dropdown
- what happens to existing media files when I switch to year/month directory structure format?
- Reject upload of wrong-sized images using the Media Uploader
- How to make a image-size selected by default in Media upload – WP v3.5