Support » Plugin: Never Moderate Registered Users » Add new filter

  • Resolved jsmo

    (@jsmo)



    The documentation is not clear IMHO: I have a custom role “mbactive” for some specific registered users. I want that only them can comment without moderation, and all other users (registered or not) to stay moderated.
    How must I modify the plugin source for this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    @jsmo: I know this response is coming late, but if you (or anyone that comes across this) still needs the solution, the following can be added to your active theme’s functions.php (or even better, a site-specific plugin).

    
    /**
     * Require that a user have 'mbactive' capability in order to be
     * trusted enough not to be moderated.
     *
     * @param $args $caps Array of trusted capabilities. If blank, then any user registered on the site is trusted.
     * @return array
     */
    function dont_moderate_mbactive( $caps ) {
    	$caps[] = 'mbactive';
    	return $caps;
    }
    add_filter( 'c2c_never_moderate_registered_users_caps', 'dont_moderate_mbactive' );
    

    Hello Scott,

    Thank you for the reply but it does not work, comments from mbactive users are still pending moderation…

    I added the function and the “add_filter” line into the functions.php of my child theme that we are using.

    • This reply was modified 5 months, 1 week ago by  jsmo.
    jsmo

    (@jsmo)

    Finally all is okay, I made a typo in the function name… Thanks a lot Scott, indeed 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.