Support » Plugin: Unattach » non-admins-roles can't unattach images

  • Resolved aundc


    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,

Viewing 1 replies (of 1 total)
  • 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”.

Viewing 1 replies (of 1 total)
  • The topic ‘non-admins-roles can't unattach images’ is closed to new replies.