The MU forums have moved to WordPress.org

Plugin to add capabilities to Author role? (1 post)

  1. prwood
    Member
    Posted 14 years ago #

    In our WordPress MU install, I need to modify the Author role so that it can moderate comments.

    I've tried both the Role Manager and Role Scoper plugins, and although I was able to install and configure them apparently correctly to give Authors the moderate comments capability, they didn't seem to have any actual effect. In addition, they are far more complicated than what I need; giving Authors comment moderation capability is all I need.

    So I'm trying to write a simple plugin for internal use. Other than the requisite plug-in header comments and PHP start/end tags, this is the entirety of the code:

    // Add caps for Author role
            $role =& get_role('author');
            $role->add_cap('moderate_comments');

    The plugin shows up and I am able to activate it "site-wide." But authors are still not able to moderate comments. Is there something else I need to do to make this plugin work?

About this Topic

  • Started 14 years ago by prwood