• Hi,

    first of all I really like this plugin – it’s very helpful to create chunks of code that are repeated over the website. Thanks for the great work!

    Now I suggest that even users without “manage_options” capability should be able to change status of the snippet (publish/unpublish).

    I have changed it myself by digging around in the core:

    insert-php\includes\class.plugin.php

    Original function:

    public function currentUserCan() {
    
    	return current_user_can( 'manage_options' );
    			
    }

    Function after my change:

    public function currentUserCan() {
    
    	return current_user_can( 'publish_wbcr-snippetss' );
    			
    }

    My solution is probably not 100% “clean” but it works for me at the moment. With this I can assign publishing rights for instance to the “Editor” role users.

    Thanks for your time! ??

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Suggestion: Change required user capability to publish/unpublish snippets’ is closed to new replies.