Last active
          May 11, 2017 01:20 
        
      - 
      
- 
        Save vicskf/c37c533e9a9d06633cd5514e192d548a to your computer and use it in GitHub Desktop. 
    TEC Filter Bar > Tribe hide timeofday option from filter
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| /* Tribe hide timeofday option from filter */ | |
| function tribe_modify_category_filter ( $values, $slug ) { | |
| if ( $slug != 'timeofday' ) return $values; | |
| foreach ( $values as $key => $value ) { | |
| if ( $value['value'] == '17-21' ) { | |
| unset( $values[$key] ); | |
| } | |
| } | |
| return $values; | |
| } | |
| add_filter( 'tribe_events_filter_values', 'tribe_modify_category_filter', 10, 2 ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment