Thanks for the great question, and for the kudos.
s2Member was NOT originally designed for administrative access protection, it was designed for Member/Customer access. However, you can certainly extend s2Member in this way.
Inside the functions.php file for your WordPress theme, you can add this snippet:
- Code: Select all
<?php
add_filter("ws_plugin__s2member_force_default_role", "default_role");
function default_role($default = "contributor"){
return "contributor";
}
?>
If you'd like to upgrade a Contributor to an Author, or to an Editor, you can log into your WP Dashboard, and go to the "Users" menu. Find the User in the list, and click "Edit".
Change their Role to Author or Editor.
Also, please be aware of the following:* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
* A Member with Level 2 access, will also be able to access Levels 0 & 1.
* A Member with Level 1 access, will also be able to access Level 0.
* A Subscriber with Level 0 access, will ONLY be able to access Level 0.
* WordPress® Subscribers are at Membership Level 0. If you're allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ).
Most importantly, given your request...* WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.If you'd like to modify the way s2Member treats Roles/Capabilties,
you can use a plugin like the
Capability Manager.