Advertisement
BakerMan

Temp fix for province/state confusion (The Events Calendar)

Sep 7th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. /**
  2.  * This is the section you are looking for...
  3.  */
  4. if( tribe_get_region( $postId ) ) {
  5.     if( $cityregion != '' ) $cityregion .= ', ';
  6.     $cityregion .= tribe_get_region( $postId );
  7. }
  8.  
  9.  
  10. /**
  11.  * Amend it to the following (this should ensure that
  12.  * the province is displayed for Canadian addresses,
  13.  * not the state):
  14.  */
  15. if( tribe_get_region( $postId ) ) {
  16.     if ( tribe_get_country( $postId ) === 'Canada' ) {
  17.         $region = tribe_get_province( $postId );
  18.     }
  19.     else {
  20.         $region = tribe_get_region( $postId );
  21.     }
  22.     if( $cityregion != '' ) $cityregion .= ', ';
  23.     $cityregion .= $region;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement