s2Member conditional code working before BP1.5,now not working…help?
-
I had the following code working in my theme’s functions.php file BEFORE I upgraded to buddypress 1.5, but since the upgrade, it doesn’t work. It doesn’t throw any errors, just doesn’t work Can somebody take a look and perhaps tell me why? I’ve been working with Christian in the s2Member forums and he suggested I post here.
Thanks,
Daisy/** s2member code */ add_action ("template_redirect", "my_custom_capabilities", 1); function my_custom_capabilities () { if (bp_is_groups_component() && bp_current_item() == 'goal-setting-and-mental-management' && !current_user_can('access_s2member_ccap_goalsettingworkingfall2011') && !current_user_can('access_s2member_ccap_goalsettingauditingfall2011')) { header('Location: ' . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); exit; } else if (bp_is_groups_component() && bp_current_item() == 'runningcontacts-i' && !current_user_can("access_s2member_ccap_runningcontactsiworkingfall2011") && !current_user_can('access_s2member_ccap_runningcontactsiauditingfall2011')) { header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); exit (); } else if ( bp_is_groups_component() && bp_current_item() == 'agility-foundation' && !current_user_can("access_s2member_ccap_foundationclassworkingfall2011") && !current_user_can('access_s2member_ccap_foundationclassauditingfall2011')) { header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); exit (); } else if ( bp_is_groups_component() && bp_current_item() == 'hooligans' && !current_user_can("access_s2member_ccap_hooligan")) { header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); exit (); } } /** end s2member code */
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘s2Member conditional code working before BP1.5,now not working…help?’ is closed to new replies.