Advertisement
verygoodplugins

Untitled

Feb 22nd, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. function my_restrict_access($can_access, $user_id, $post_id) {
  2.    
  3.     if( wp_fusion()->user->has_tag( 'yearly subscriber - one year' ) || wp_fusion()->user->has_tag( 'yearly subscriber - two years' ) ) {
  4.         return true;
  5.     }
  6.  
  7.     if( $post_id == '546' && wp_fusion()->user->has_tag( '50' ) && wp_fusion()->user->has_tag( '8' ) ) {
  8.         return true;
  9.     }
  10.  
  11.     return false;
  12.  
  13. }
  14.  
  15. add_filter('wpf_user_can_access', 'my_restrict_access', 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement