View own posts media only WordPress Plugin

View own posts and media only

View own posts and media only

If your blog has multiple authors, you may wish to show for every author just her own posts only at admin back-end. What’s about to hide from them Media Library items, which were uploaded by other authors?
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.1. Click the Download button below if you wish to try it.
Quant of downloads: 1092

download

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.

View own posts media only plugin options

View own posts media only plugin options

Special Thanks

- 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.

Change Log

1.1

  • 13.05.2013
  • Enhance compatibility with other plugins:
  • Do 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.

1.0

  • 06.01.2013
  • 1st release

If you have any feedback about this plugin, you are welcome!

Tags: , ,

  • Neo

    Hi, thank you for creating this plugin this will surely help our Intranet based on WordPress with many Contributors coming from many departments.

    I need my Contributors to only see their own Media, Drafts, Pending, Trash and Published (View Only) Posts.

    I think this plugin is perfect, unfortunately this doesn’t seem to work on my site besides the Media uploaded. For Posts in the Admin area, my Contributor still see other articles with the same access level for Drafts and Pending and nothing at all for the Published Posts. What must be causing this?

    Just a background of my installation that might have impact with your plugin:
    * I have a Multisite (plugin is activated network wide).
    * I have Role Scoper to limit Contributors to certain categories when they make a Post.

    Hope to hear from you!

    Thanks a lot!

  • Хамиль

    Добрый день, Владимир! Спасибо за Plugin.

    У вас не будет возможности добавить дополнительную опцию?

    Запретить редактировать закаченные пользователем картинки (линк на редактирование появляется в правом фрейме ATTACHMENT DETAILS

    Спасибо.

  • Хамиль

    Выяснилось, что плагин конфликтует с плагином “WP Help” перекрывая доступ пользователей к разделам Publishing Help #bug

  • http://shinephp.com/ Vladimir Garagulya

    Добрый день, Хамиль.

    Можно ссылку на скриншот, что точно понимать, о каком линке мы говорим?

    С уважением,
    Владимир.

  • http://shinephp.com/ Vladimir Garagulya

    Похоже нужно добавлять секцию со списком определённых в блоге пользовательских типов статей (custom post type). Плагин блокирует их все. Я уже добавил в код исключения для пары плагинов. Но это проблем не решает. Будут работать над более общим подходом, чтобы пользователь сам решал, что разрешать, что запрещать.
    Спасибо за информацию.