Support » Plugin: WP Help » [Plugin: WP Help] Used with Adminimize plugin & admin / editor roles

  • Resolved hunnsdon


    After a long awaited update there was one issue for me that I now cannot get to operate. I need to lockout any user below admin (i.e. editor) from editing / managing or adding topics.

    Contacted Mark on his “” site. Got a good answer. Only I’m not an advanced user and don’t know how to accomplish the advice.

    Mark wrote: July 18, 2012 at 2:31 pm
    “You’ll have to hook in and change the roles assigned to the ‘wp-help’ custom post type.”

    See orginal post on that site: 2nd post – Two thirds down the page

    I can quite happily follow step by step instructions in editing files.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey hunnsdon,

    when you look at the main wp-help.php file you see part where the custom post type is registered around line 100. The part where it sets the capabilities needed to read a post applies a filter

    'read_post' => apply_filters( 'cws_wp_help_view_documents_cap', 'edit_posts' ),

    To change this you would need to create something like this to your themes functions.php:

    <?php add_filter('cws_wp_help_view_documents_cap', function() { return 'manage_options';}) ?>

    This is not tested but should overwrite the default requirements to view the help files so only admins can see them.

    hi jancbeck

    I tried this but getting a 500 error now and the site doesn’t load at all until I remove it.

    Any help would be appreciated, thanks. Or if you can guide me in the right direction to get it to work.

    Unfortunately I’ve had to abandon this plugin for the time being as I need a way to hide editing from other users.

    If someone can come up with a solution then great, but until then I’m using ‘Dashboard Site Notes’ by Ben Irvin.

    Drew Jaynes


    WordPress Core Developer

    jancbeck’s filter would work on most servers but IIS servers (Windows) don’t always play nice with anonymous functions. Using a more traditional filter should do the trick:

    function change_read_cap() {
    	return 'manage_options';
    add_filter( 'cws_wp_help_view_documents_cap', 'change_read_cap' );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Help] Used with Adminimize plugin & admin / editor roles’ is closed to new replies.