Clean up spaces, tabs, indentation, and bracket formatting
This commit is contained in:
@@ -2,32 +2,39 @@
|
||||
/**
|
||||
* Event Venue
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @package SportsPress/Templates
|
||||
* @author ThemeBoy
|
||||
* @package SportsPress/Templates
|
||||
* @version 2.7.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
if ( get_option( 'sportspress_event_show_venue', 'yes' ) === 'no' ) return;
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
if ( get_option( 'sportspress_event_show_venue', 'yes' ) === 'no' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! isset( $id ) )
|
||||
if ( ! isset( $id ) ) {
|
||||
$id = get_the_ID();
|
||||
}
|
||||
|
||||
$venues = get_the_terms( $id, 'sp_venue' );
|
||||
|
||||
if ( ! $venues )
|
||||
if ( ! $venues ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
|
||||
$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
|
||||
$link_venues = get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false;
|
||||
|
||||
foreach( $venues as $venue ):
|
||||
foreach ( $venues as $venue ) :
|
||||
$t_id = $venue->term_id;
|
||||
$meta = get_option( "taxonomy_$t_id" );
|
||||
|
||||
$name = $venue->name;
|
||||
if ( $link_venues )
|
||||
if ( $link_venues ) {
|
||||
$name = '<a href="' . get_term_link( $t_id, 'sp_venue' ) . '">' . $name . '</a>';
|
||||
}
|
||||
|
||||
$address = sp_array_value( $meta, 'sp_address', null );
|
||||
$address = urlencode( $address );
|
||||
@@ -40,7 +47,7 @@ foreach( $venues as $venue ):
|
||||
<th><?php echo $name; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if ( $show_maps ): ?>
|
||||
<?php if ( $show_maps ) : ?>
|
||||
<tbody>
|
||||
<tr class="sp-event-venue-map-row">
|
||||
<td><?php sp_get_template( 'venue-map.php', array( 'meta' => $meta ) ); ?></td>
|
||||
|
||||
Reference in New Issue
Block a user