diff --git a/includes/admin/settings/class-sp-settings-events.php b/includes/admin/settings/class-sp-settings-events.php
index 4bd1974b..564f45c1 100644
--- a/includes/admin/settings/class-sp-settings-events.php
+++ b/includes/admin/settings/class-sp-settings-events.php
@@ -58,7 +58,7 @@ class SP_Settings_Events extends SP_Settings_Page {
array(
'title' => __( 'Venue', 'sportspress' ),
'desc' => __( 'Display maps', 'sportspress' ),
- 'id' => 'sportspress_event_show_map',
+ 'id' => 'sportspress_event_show_maps',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
diff --git a/includes/admin/settings/class-sp-settings-players.php b/includes/admin/settings/class-sp-settings-players.php
index f45668a0..676480cf 100644
--- a/includes/admin/settings/class-sp-settings-players.php
+++ b/includes/admin/settings/class-sp-settings-players.php
@@ -42,8 +42,8 @@ class SP_Settings_Players extends SP_Settings_Page {
array(
'title' => __( 'Nationality', 'sportspress' ),
- 'desc' => __( 'Display national flag', 'sportspress' ),
- 'id' => 'sportspress_player_show_flag',
+ 'desc' => __( 'Display national flags', 'sportspress' ),
+ 'id' => 'sportspress_player_show_flags',
'default' => 'yes',
'type' => 'checkbox',
),
diff --git a/templates/event-venue.php b/templates/event-venue.php
index d6b811a5..7b287312 100644
--- a/templates/event-venue.php
+++ b/templates/event-venue.php
@@ -4,7 +4,8 @@ if ( ! isset( $id ) )
$venues = get_the_terms( $id, 'sp_venue' );
-$show_map = get_option( 'sportspress_event_show_map', 'yes' ) == 'yes' ? true : false;
+$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
+$link_venues = get_option( 'sportspress_event_link_venues', 'no' ) == 'yes' ? true : false;
if ( ! $venues )
return $output;
@@ -13,6 +14,10 @@ foreach( $venues as $venue ):
$t_id = $venue->term_id;
$term_meta = get_option( "taxonomy_$t_id" );
+ $name = $venue->name;
+ if ( $link_venues )
+ $name = '' . $name . '';
+
$address = sp_array_value( $term_meta, 'sp_address', '' );
$latitude = sp_array_value( $term_meta, 'sp_latitude', 0 );
$longitude = sp_array_value( $term_meta, 'sp_longitude', 0 );
@@ -21,14 +26,14 @@ foreach( $venues as $venue ):
- | name; ?> |
+ |
|
-
+
|
diff --git a/templates/player-gallery.php b/templates/player-gallery.php
index 7800cdb0..26c55ee9 100644
--- a/templates/player-gallery.php
+++ b/templates/player-gallery.php
@@ -10,6 +10,7 @@ $defaults = array(
'columns' => 3,
'size' => 'thumbnail',
'show_all_players_link' => false,
+ 'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false,
);
extract( $defaults, EXTR_SKIP );
@@ -87,10 +88,19 @@ if ( is_int( $number ) && $number > 0 )
foreach( $data as $player_id => $performance ):
$caption = get_the_title( $player_id );
+ $caption = trim( $caption );
+
+ // Add player number to caption if available
$player_number = get_post_meta( $player_id, 'sp_number', true );
- if ( $player_number ):
+ if ( $player_number )
$caption = '' . $player_number . ' ' . $caption;
- endif;
+
+ // Add caption tag if has caption
+ if ( $captiontag && $caption )
+ $caption = '<' . $captiontag . ' class="wp-caption-text gallery-caption">' . wptexturize( $caption ) . '' . $captiontag . '>';
+
+ if ( $link_posts )
+ $caption = '' . $caption . '';
if ( isset( $limit ) && $i >= $limit )
continue;
@@ -103,12 +113,7 @@ foreach( $data as $player_id => $performance ):
<{$icontag} class='gallery-icon portrait'>"
. '' . $thumbnail . ''
. "{$icontag}>";
- if ( $captiontag && trim( $caption ) ) {
- $output .= '' . "
- <{$captiontag} class='wp-caption-text gallery-caption'>
- " . wptexturize($caption) . "
- {$captiontag}>" . '';
- }
+ $output .= $caption;
$output .= "{$itemtag}>";
if ( $columns > 0 && ++$i % $columns == 0 )
$output .= '
';
diff --git a/templates/player-metrics.php b/templates/player-metrics.php
index 8fc9ba6d..936cf4bb 100644
--- a/templates/player-metrics.php
+++ b/templates/player-metrics.php
@@ -3,7 +3,7 @@ if ( ! isset( $id ) )
$id = get_the_ID();
$defaults = array(
- 'show_nationality_flag' => get_option( 'sportspress_player_show_flag', 'yes' ) == 'yes' ? true : false,
+ 'show_nationality_flags' => get_option( 'sportspress_player_show_flags', 'yes' ) == 'yes' ? true : false,
);
extract( $defaults, EXTR_SKIP );
@@ -18,7 +18,7 @@ $metrics = sp_get_player_metrics_data( $id );
$common = array();
if ( $nationality ):
$country_name = sp_array_value( $countries, $nationality, null );
- $common[ SP()->text->string('Nationality', 'player') ] = $country_name ? ( $show_nationality_flag ? '
' : '' ) . $country_name : '—';
+ $common[ SP()->text->string('Nationality', 'player') ] = $country_name ? ( $show_nationality_flags ? '
' : '' ) . $country_name : '—';
endif;
$data = array_merge( $common, $metrics );