Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Find the following in full-address.php: -->
- <?php if( tribe_get_country( $postId ) ) { ?>
- <?php $address_out []= '<span itemprop="addressCountry">' . tribe_get_country( $postId ) . '</span>'; ?>
- <?php } ?>
- <!-- Replace with something like this: -->
- <?php
- if( tribe_get_country( $postId ) ) {
- $country = tribe_get_country( $postId );
- // A switch statement is an ungainly way of doing this, it would
- // be preferable to use a lookup table - but this gives an idea
- // of the basic mechanics
- switch ( $country ) {
- case 'Canada':
- $country = 'CA';
- break;
- case 'United States':
- $country = 'US';
- break;
- }
- $address_out []= '<span itemprop="addressCountry">' . esc_html( $country ) . '</span>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment