Existing WordPress permissions system doesn’t allow to realize such model. Yes, WordPress prohibits author to edit or delete posts and items of other authors, but she still see all that stuff. It’s slightly inconvenient, isn’t it?
“View Own Posts Media Only” WordPress plugin includes a set of useful hacks (don’t panic that’s just a legal code snippets, nothing from the dark territory of hackers, crackers and other malware manufactures) to offer you desired features, I wrote above.
The latest version: 1.2. Click the Download button below if you wish to try it.
Quant of downloads: 5677
As additional options plugin may automatically select “Uploaded to this post” item from drop-down list at Insert Media – Media Library dialog and hide this drop-down menu for all users except Administrator and Editor, or other words user with ‘edit_other_posts’ capability.
– Main part of the code is taken from StackExchange. Thanks to Paul for ideas and code samples.
– designlabcph – thanks for ideas and help with code snippets searching. From the begin I plan to make plugin work in silence, without any options. After this discussion plugin got additional functionality and options page was appeared.
- Added option to turn on/off ability to hide comments to the posts of other authors. Admin sees all comments now.
- Added option to exclude from plugin action selected custom post type. If you use plugin "Contact Form 7", do not forget to exclude its 'wpcf7_contact_form' post type from this plugin action.
- Enhance compatibility with other plugins:
- Does not hide custom type posts created by Contact Form 7 plugin;
- Support for 'supress_filters' query variable is added. If you need to make a query without it being filtered by "View Own Post Media Only", use $wp_query->set ("suppress_filters", true); at your plugin or theme.
- 1st release
If you have any feedback about this plugin, you are welcome!