[resolved] non-admins-roles can't unattach images (2 posts)

  1. aundc
    Posted 3 years ago #

    i' found this so very usefull plugin cause need it that feature so much, thx!
    one only problem: at the moment it is prohibited for non-admins-roles to unattach images. may there be a simple solution to change that (or for my own in some php-file e.g.)? Cause my friend won't use to be admin but sometimes he likes to change some attributes in articles and so on ...
    thanks in advance,


  2. pressupinc
    Posted 3 years ago #

    Hi, I realize you posted this ages ago, but I had this same problem. And I believe I solved it.

    It turns out it's basically required that users have the ability to either import or export for you to be able to access the URL where this plugin does its work (tool.php). By default only admins and superadmins have that right, but it's relatively easy to change that. You can put these four lines in their own custom plugin or (if you must) your theme's functions.php file.

    add_action('admin_init', 'mysite_custom_user_rights');
    function mysite_custom_user_rights() {
    	$editor = get_role('editor');

    To make them work for a contributor or author, you'd just need to literally change all the instances of "editor" to "contributor" or "author".

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Unattach
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic