Last active
August 29, 2015 13:56
-
-
Save ckpicker/9008700 to your computer and use it in GitHub Desktop.
Community Add-on 3.4.1 // Restrict Event Submission for Certain Roles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_head', 'community_restrict_access' ); | |
function community_restrict_access() { | |
if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { | |
if(current_user_can('subscriber') || current_user_can('custom_role_name')) { | |
wp_redirect( get_bloginfo('home') . "/error/" ); exit; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment