daily pastebin goal
77%
SHARE
TWEET

FB Events: use event URL where possible

BakerMan Mar 24th, 2014 914 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter( 'tribe_get_event_website_url', 'event_website_use_fb_event_url', 10, 2 );
  2.  
  3. function event_website_use_fb_event_url( $url, $id ) {
  4.         $fb_id = get_post_meta( $id, '_FacebookID', true );
  5.         if ( empty( $fb_id ) ) return $url;
  6.         return esc_url( 'http://facebook.com/events/' . $fb_id );
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top