Advertisement
BakerMan

Amendment to private event categories (TEC)

Sep 6th, 2012
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. // Remove this line
  2. add_filter( 'parse_tribe_event_query', 'hide_my_private_category', 999 );
  3.  
  4. // Replace it with this
  5. add_action('init', 'whenLoggedOut');
  6.  
  7. // And also add this
  8. function whenLoggedOut() {
  9.     $current_user = wp_get_current_user();
  10.     if ($current_user->ID === 0)
  11.         add_filter('parse_tribe_event_query', 'hide_my_private_category', 999);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement