helpful_capability

With this filter you can determine which roles can view and edit Helpful’s settings. The important thing is that this role can then do everything within Helpful – there is no way to distinguish if one role can only view and another role can only edit. One role can do everything!

/**
 * @param string $capability
 * @return string
 */
add_filter('helpful_capability', function (string $capability) {
    $capability = 'manage_options'; // only for admins
    return $capability;
});

This filter must also be set for everything to work: helpful_settings_capability

Was this post helpful?

Top