Some code cleaning
This commit is contained in:
@@ -29,9 +29,8 @@ foreach( $venues as $venue ):
|
||||
if ( $link_venues )
|
||||
$name = '<a href="' . get_term_link( $t_id, 'sp_venue' ) . '">' . $name . '</a>';
|
||||
|
||||
$address = sp_array_value( $meta, 'sp_address', '' );
|
||||
$latitude = sp_array_value( $meta, 'sp_latitude', 0 );
|
||||
$longitude = sp_array_value( $meta, 'sp_longitude', 0 );
|
||||
$address = sp_array_value( $meta, 'sp_address', null );
|
||||
$address = urlencode( $address );
|
||||
?>
|
||||
<div class="sp-template sp-template-event-venue">
|
||||
<h4 class="sp-table-caption"><?php _e( 'Venue', 'sportspress' ); ?></h4>
|
||||
@@ -41,7 +40,7 @@ foreach( $venues as $venue ):
|
||||
<th><?php echo $name; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if ( $show_maps && $latitude != null && $longitude != null ): ?>
|
||||
<?php if ( $show_maps ): ?>
|
||||
<tbody>
|
||||
<tr class="sp-event-venue-map-row">
|
||||
<td><?php sp_get_template( 'venue-map.php', array( 'meta' => $meta ) ); ?></td>
|
||||
|
||||
@@ -27,7 +27,7 @@ if ( '' === $address ) $address = '+';
|
||||
if ( 'satellite' !== $maptype ) $maptype = 'roadmap';
|
||||
|
||||
if ( $latitude != null && $longitude != null ){
|
||||
do_action ( 'sp_venue_show_map', $latitude, $longitude, $address, $zoom, $maptype );
|
||||
do_action ( 'sp_venue_show_map', $latitude, $longitude, $address, $zoom, $maptype );
|
||||
}
|
||||
if ( is_tax( 'sp_venue' ) )
|
||||
do_action ( 'sportspress_after_venue_map' );
|
||||
Reference in New Issue
Block a user