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