The solution to this is pretty ugly. First, I am going to have to create all posts in this system starting at a high ID number (say, 10000). I’ll have to do this via wp_insert_post with the “import_id” suggestion. That will move all the content I don’t want the user to be able to touch, to a safe range.
Then, using the method described here: http://mawaha.com/allow-user-to-edit-specific-post-using-map_meta_cap/
map the meta capability for “edit_post”, when post number is less than 10000.
It works, but man I wish WP allowed a capability filter to be added to the media handler 🙁
Related Posts:
- Remove upload_files capability from a role but allow role to manage an avatar image
- How to safely allow user upload on CPTs?
- WordPress bug with capabilities?
- Remove upload file types filter for admin
- Capability to prevent upload of files
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- wp_upload_dir how to get just the directory name .
- How Can I Organize the Uploads Folder by Slug (or ID, or FileType, or Author)?
- Display attachments by ID in a wp.media frame
- Upload folder is not writable, even when permissions are correct
- Using same directory for storing all uploaded images on a WordPress network
- Contact Form 7 – process form using a PHP script, instead of mailing [closed]
- Where do the favicons for Media Files come from
- How to manage a standalone media folder?
- Saving images from Gravity Forms repeatable File Upload as post attachments [closed]
- How do I link directly to uploaded files?
- Is wp_read_audio_metadata() function deprecated?
- Uploaded image, but not showing
- WordPress REST Upload Media
- front end post with multiple upload images?
- Restrict file uploads by extension?
- Add a file type
- WordPress upload file – get path to WordPress installation
- Select image sizes you want to be uploaded
- Check if image exists before uploading with media_sideload_image()
- Plugin to Import Dropbox Files into Media Folder from the Cloud [closed]
- Disable gallery in 3.5 media iframe
- Extend the list of MIME-types supported by the builtin uploader in 3.3
- Setting higher upload limit
- What error logs can I check to see why plugin updates are failing?
- WordPress won’t generate image sizes for certain images
- How can I reduce file upload size?
- Uploading dwg files to wordpress
- WordPress HTTP Error on File upload
- Images not being generated at correct size
- Remove attachment fields from custom media uploader
- Custom “Insert into Post” button
- How to use MediaUpload outside of editor
- Switch between tabs on “Insert Media” dialog
- Site running slow on new server?
- update_options and unique filenames
- REST API: upload media with advanced custom fields (ACF)
- Prevent a folder from being shown within the media library
- Why is unfiltered_upload not working despite being enabled?
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- After moving from complete AWS setup to a standalone WordPress Server, Media/Image Files are Broken
- Upload Button in meta box not opening library
- Duplicates and other problems in Media Library
- “send_to_editor” function returning pdf file name
- WordPress Media frame pre load images from ids
- How to allow logged out users to upload media?
- Choosing images size when uploading
- Easing the download of a regularly uploaded pdf
- Get all images in uploads directory and list them
- WordPress Bug on IIS ? Problem when uploading image on IIS 7
- Upload mime types for ai illustrator file
- upload_max_filesize in .user.ini Not Reflected in Media Upload
- Is it possible to import all files from a uploads DIR into WP media, retaining paths to the files
- How does WordPress decides how many sizes of an image to create?
- Big file upload give HTTP error
- Organizing uploaded Media in permalink-based folder structure?
- Offload Media Library to other domain on a different server
- What functions of WP_Filesystem allow me to create a file with code-generated contents in a directory?
- Image upload to media library fails. Folder won’t create, database insert fail, XAMPP Windows
- Right way to download file from source to destination
- Incorrect filenames in load-scripts.php parameters
- wordpress upload permission on nginx & ubuntu
- Embed HTML5 files/subfolders in post?
- How to change archieve frequency of the media file in uploads folder for wordpress blog
- Insert attachments from custom uploader into post (regular uploader style)
- How to download CSV from sub directory in uploads folder
- Import media (.xml) does not attribute featured images to posts
- Blog suddenly can’t display .jpg
- Upload multiple files
- wordpress Do not show new image attachment in media
- 413 Request Entity Too Large nginx/1.18.0 (Ubuntu)
- Modify Maximum upload file size text in WordPress Media
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- Sanitizing existing media library paths and page links from foreign characters
- Cannot upload png photo files into media library. I get a ‘Could not insert post into the database’
- Do audio files impact the loading time of the website?
- File upload in WordPress
- Set default “Link CSS Class” in add media admin editor
- How to change default upload dir?
- How could you allow users to upload a video in within their profile and display it on a wordpress site?
- 45mb File Exceeds the Maximum Execution Time
- How to share media between independent blogs?
- Limit attachment caption characters
- Password protected uploaded PDF page
- Add media button does not insert image in the editor
- How to find out if all enqueued files are uploaded?
- Upload Multiple Files With Multiple Fields And With media_handle_upload
- controlling whether upload is attached to post or not
- Attachment Metadata not updated while uploading audio files
- Is it possible to upload files for wordpress importer over FTP?
- how to upload and allow downloads of .mobi and .epub formats
- Basic File/Post restriction plugin
- Upload User Avatar from android to WordPress using Rest API
- Limit max upload file size in front end submmission form