Last active
          February 23, 2017 06:26 
        
      - 
      
- 
        Save vicskf/937e9e0e9324c857b6df623e3ebe979e to your computer and use it in GitHub Desktop. 
  
    
      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>'; | |
| } | |
| function register_inline_linked_thumb_tag( array $placeholders ) { | |
| $placeholders['{thumbnail:linked}'] = 'do_linked_thumb_placeholder'; | |
| return $placeholders; | |
| } | |
| add_filter( 'tribe_events_pro_inline_placeholders', 'register_inline_linked_thumb_tag' ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment