<?php
add_action ("template_redirect", "my_function");
function my_function ()
{
$forumA_id = 123; /* Configure this please. */
$forumB_id = 456; /* Configure this please. */
if (bbp_get_forum_id () === $forumA_id && current_user_cannot ("access_s2member_ccap_forumA"))
{
wp_redirect (S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit;
}
else if (bbp_get_forum_id () === $forumB_id && current_user_cannot ("access_s2member_ccap_forumB"))
{
wp_redirect (S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit;
}
}
?>
Statistics: Posted by Jason Caldwell — June 20th, 2011, 5:12 am
Statistics: Posted by Jason Caldwell — June 20th, 2011, 4:16 am
Note, it is currently NOT possible to protect a Forum, and have all Topics inside that Forum protected automatically. In order to accomplish that, you'll need to use s2Member's URI Access Restrictions. We're working to improve this functionality in the mean time.
Statistics: Posted by Cristián Lávaque — June 18th, 2011, 12:16 pm
Statistics: Posted by Cristián Lávaque — June 18th, 2011, 12:16 am
Statistics: Posted by blogjunkie — June 17th, 2011, 1:48 am