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 | |
| /* | |
| * Adds the placeholder {thumbnail:linked} for the shortcode [tribe_event_inline] | |
| * To be used as a new variable that outputs the thumbnail with a link to the event | |
| * | |
| * Author: Barry Hughes | |
| */ | |
| function do_linked_thumb_placeholder( $event_id ) { | |
| return '<a href="' . get_permalink( $event_id ) . '">' . tribe_event_featured_image( $event_id, 'full', false ) . '</a>'; | 
  
    
      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 | |
| /* | |
| * Shows the event for the first day and remove it from the rest in a multi-day event. | |
| * Limited to month view only | |
| * | |
| * Author: Barry Hughes | |
| */ | |
| function reduce_month_view_single_events( $events ) { | |
| static $rendered_ids = array(); | 
  
    
      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' ) { | |
  
    
      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 | |
| /* | |
| * Does not show past events from The Events Calendar | |
| */ | |
| add_filter('tribe_events_pre_get_posts', 'filter_tribe_all_occurences', 100); | |
| function filter_tribe_all_occurences ($wp_query) { | |
| if ( !is_admin() ) { | 
  
    
      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 | |
| /** | |
| * Filters the upload size limit for community events submission form only | |
| * | |
| * @param string $size Upload size limit (in bytes). | |
| * @return int Filtered size limit. | |
| */ | |
| function set_max_upload_size_limit_community_events_submission($size){ | |
| if ( tribe_is_community_edit_event_page() ){ | 
  
    
      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 | |
| /* | |
| * Orders Related Events by Event Start Date | |
| */ | |
| function tribe_related_posts_args_limiter ( $args = array() ) { | |
| $args['meta_key'] = '_EventStartDate'; | |
| $args['orderby'] = 'meta_value'; | |
| return $args; | |
| } | |
| add_filter( 'tribe_related_posts_args', 'tribe_related_posts_args_limiter', 10, 1 ); | 
  
    
      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 | |
| /* Custom Event Cost validation */ | |
| function tribe_custom_event_cost_validation ( $valid, $submission, $class ) { | |
| /* Prevents submit and adds error message if cost is empty and different than '0' */ | |
| if ( empty( $submission['EventCost'] ) && $submission['EventCost'] != '0' ) { | |
| $valid = false; | |
| $message = __( '%s is required', 'tribe-events-community' ); | 
  
    
      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 | |
| /** | |
| * Adds day headers between events in the loop when the day has changed | |
| * | |
| **/ | |
| add_filter( 'tribe_events_list_the_date_headers', 'the_date_headers_add_day_header_separator', 10, 1 ); | |
| function the_date_headers_add_day_header_separator ( $html ){ | 
  
    
      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 dayofweek option from filter */ | |
| function tribe_modify_category_filter ( $values, $slug ) { | |
| if ( $slug != 'dayofweek' ) return $values; | |
| foreach ( $values as $key => $value ) { | |
| // If Monday, Tuesday or Wednesday then unset the values | |
| if ( $value['value'] == '2' || $value['value'] == '3' || $value['value'] == '4') { | 
  
    
      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 | |
| add_action( 'woocommerce_order_item_meta_start', 'add_venue_to_order', 101, 4 ); | |
| function add_venue_to_order( $item_id, $item, $order, $plain_text = '' ){ | |
| $wootix = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
| $item_data = $item->get_data(); | |
| $event = $wootix->get_event_for_ticket( $item_data['product_id'] ); | |
| //get event venue | |
| $event_venue = tribe_get_venue( $event ); | |
| // Show event Venue Name if this ticket is for a tribe event. | 
OlderNewer