Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('wpf_user_can_access', 'restrict_post_categories', 10, 3);
- function restrict_post_categories($can_access, $user_id, $post_id) {
- $tags = wp_fusion()->user->get_tags( $user_id );
- if( ( in_array('TagA', $tags) && in_array('TagB', $tags) && in_array('TagC', $tags) ) || in_array('TagD', $tags) || in_array('TagE', $tags) ) {
- return false;
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement