Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Don't load directly
- if ( !defined( 'ABSPATH' ) ) {
- die('-1');
- }
- /**
- * The Venue Meta Box
- * You can customize this view by putting a replacement file of the same name (delete.php) in the events/community/ directory of your theme.
- *
- * @package TribeCommunityEvents
- * @since 1.0
- * @author Modern Tribe Inc.
- */
- ?>
- <tr class="venue">
- <td><?php _e( 'Country:', 'tribe-events-community' ); ?></td>
- <td>
- <select class="chosen" tabindex="<?php $this->tabIndex(); ?>" name='venue[Country]' id="EventCountry">
- <?php
- $countries = TribeEventsViewHelpers::constructCountries( $postId );
- $defaultCountry = tribe_get_option('defaultCountry');
- if ( isset( $_VenueCountry ) && $_VenueCountry ) {
- $current = $_VenueCountry;
- } elseif ( isset( $defaultCountry[1] ) && tribe_get_option( 'defaultValueReplace' ) ) {
- $current = $defaultCountry[1];
- } else {
- $current = null;
- }
- foreach ( $countries as $abbr => $fullname ) {
- echo '<option value="' . esc_attr( $fullname ) . '" ';
- if($abbr == '')
- echo "disabled='disabled' ";
- selected( $current == $fullname );
- echo '>' . esc_html( $fullname ) . '</option>';
- }
- ?>
- </select>
- </td>
- </tr>
- <tr class="venue">
- <?php
- if ( tribe_get_option( 'defaultValueReplace' ) ) {
- $_VenueState = tribe_get_option( 'eventsDefaultState' );
- $_VenueProvince = tribe_get_option( 'eventsDefaultProvince' );
- }
- ?>
- <?php if ( !isset( $_VenueStateProvince ) || $_VenueStateProvince == '' ) $_VenueStateProvince = -1; ?>
- <td><?php _e('State or Province:','tribe-events-calendar'); ?></td>
- <td><input tabindex="<?php $this->tabIndex(); ?>" id="StateProvinceText" name="venue[Province]" type='text' size='25' value='<?php echo ( isset($_VenueProvince) && $_VenueProvince != '' && $_VenueProvince != -1 ) ? esc_attr($_VenueProvince) : esc_attr(''); ?>' />
- <select class="chosen" tabindex="<?php $this->tabIndex(); ?>" id="StateProvinceSelect" name="venue[State]">
- <option value=""><?php _e( 'Select a State:', 'tribe-events-community' ); ?></option>
- <?php
- foreach ( TribeEventsViewHelpers::loadStates() as $abbr => $fullname ) {
- echo '<option value="' . $abbr .'" ';
- selected( $_VenueState == $abbr );
- echo '>' . esc_html( $fullname ) . '</option>' . "\n";
- }
- ?>
- </select>
- </td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment