Optin Optin
Use code:
0 Day
00 Hour
00 Min
00 Sec
Logo

Documentation

s2_capability

This hook allows access to the Subscribe2 menu pages to be restricted or relaxed as users see fit. Each page has an individual slug for identification. Based on the slug the default user capability can be changed to allow lower-level users to access the page or to block access for all but the highest level users. The WordPress Codex contains a list of capabilities associated with the default roles.

function s2_admin_changes( $capability, $menu ) {
    // $capability is the core WordPress capability to allow admin page access
    // $menu is the title of the page:
    //  'user' for access to personal subscription settings
    //  'manage' to allow access to the user management screen
    //  'settings' to allow access to the plugin settings
    //  'send' for access to the Send Email page
 
    // identify the menu you are changing capability for first
    // then return a new capability
    if ( $menu == 'send' ) {
        return 'read';
    }
 
    return $capability;
}
 
add_filter('s2_capability', 's2_admin_changes', 10, 2);
Still stuck? Contact

How can we help?

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We got your message

We will reply to you very soon :)