Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Check the (not) tags on all visibility_by_role settings.
- if ( ! empty( $tags_not ) ) {
- // Required tags (not).
- $result = array_intersect( $tags_not, $user_tags );
- if ( empty( $result ) ) {
- $can_access = true;
- }
- }
- } else {
- // The user is not logged-in.
- $can_access = true;
- }
- $can_access = apply_filters(
- 'wpf_user_can_access_block',
- $can_access,
- $attributes
- );
- $can_access = apply_filters(
- 'wpf_user_can_access',
- $can_access,
- wpf_get_current_user_id(),
- false
- );
- if ( $can_access ) {
- return true;
- } else {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement