Advertisement
presseddesigns

Current Date Condition for The Events Calendar

Jul 18th, 2013
653
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1.     // If the WordPress date setting matches DATEONLYFORMAT, make the string more readable
  2.         if ( get_option( 'date_format' ) == TribeDateUtils::DATEONLYFORMAT ) {
  3.             /* If the event happens this year, no need to show the year, unless it ends on another year (multi-day) */
  4.             if ( tribe_get_start_date( $event, false, 'Y' ) === date( 'Y' ) && tribe_get_end_date( $event, false, 'Y' ) === date( 'Y' ) ) {
  5.                 $format = 'F j';
  6.             }
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement