Display team logos under event title
This commit is contained in:
@@ -236,7 +236,7 @@ class SP_Admin_Welcome {
|
|||||||
<h4><?php _e( 'Translators', 'sportspress' ); ?></h4>
|
<h4><?php _e( 'Translators', 'sportspress' ); ?></h4>
|
||||||
<p><?php _e( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="https://www.transifex.com/projects/p/sportspress/">Translate SportsPress</a>.', 'sportspress' ); ?></p>
|
<p><?php _e( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="https://www.transifex.com/projects/p/sportspress/">Translate SportsPress</a>.', 'sportspress' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
$translator_handles = array( 'Abdulelah', 'albertone', 'aylaview', 'Bhelpful2', 'bizover', 'BOCo', 'dic_2008', 'hanro', 'i__k', 'Jarski', 'JensZ', 'JuKi', 'karimjarro', 'rochester', 'Selskei', 'Spirossmil', 'ThemeBoy', 'valentijnreza' );
|
$translator_handles = array( 'Abdulelah', 'albertone', 'aylaview', 'Bhelpful2', 'bizover', 'BOCo', 'dic_2008', 'hanro', 'i__k', 'JensZ', 'JuKi', 'karimjarro', 'rochester', 'Selskei', 'Spirossmil', 'ThemeBoy', 'valentijnreza' );
|
||||||
$translator_links = array();
|
$translator_links = array();
|
||||||
foreach ( $translator_handles as $handle ):
|
foreach ( $translator_handles as $handle ):
|
||||||
$translator_links[] = '<a href="https://www.transifex.com/accounts/profile/' . $handle . '">' . $handle . '</a>';
|
$translator_links[] = '<a href="https://www.transifex.com/accounts/profile/' . $handle . '">' . $handle . '</a>';
|
||||||
|
|||||||
@@ -56,6 +56,14 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|||||||
|
|
||||||
array( 'type' => 'delimiter' ),
|
array( 'type' => 'delimiter' ),
|
||||||
|
|
||||||
|
array(
|
||||||
|
'title' => __( 'Teams', 'sportspress' ),
|
||||||
|
'desc' => __( 'Display logos', 'sportspress' ),
|
||||||
|
'id' => 'sportspress_event_show_logos',
|
||||||
|
'default' => 'yes',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Venue', 'sportspress' ),
|
'title' => __( 'Venue', 'sportspress' ),
|
||||||
'desc' => __( 'Display maps', 'sportspress' ),
|
'desc' => __( 'Display maps', 'sportspress' ),
|
||||||
|
|||||||
@@ -98,6 +98,15 @@ function sportspress_the_title( $title, $id ) {
|
|||||||
if ( $role != null ):
|
if ( $role != null ):
|
||||||
$title = '<strong>' . $role . '</strong> ' . $title;
|
$title = '<strong>' . $role . '</strong> ' . $title;
|
||||||
endif;
|
endif;
|
||||||
|
elseif ( is_singular( 'sp_event' ) && get_option( 'sportspress_event_show_logos', 'yes' ) == 'yes' ):
|
||||||
|
$teams = get_post_meta( $id, 'sp_team' );
|
||||||
|
if ( $teams ):
|
||||||
|
$title .= '<div class="sp-event-teams">';
|
||||||
|
foreach ( $teams as $team ):
|
||||||
|
$title .= get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . ' ';
|
||||||
|
endforeach;
|
||||||
|
$title .= '</div>';
|
||||||
|
endif;
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
return $title;
|
return $title;
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ $float = is_rtl() ? 'right' : 'left';
|
|||||||
$selector = 'sp-player-gallery-' . $id;
|
$selector = 'sp-player-gallery-' . $id;
|
||||||
|
|
||||||
$list = new SP_Player_List( $id );
|
$list = new SP_Player_List( $id );
|
||||||
$list->columns = $performance;
|
|
||||||
$data = $list->data();
|
$data = $list->data();
|
||||||
|
|
||||||
// Remove the first row to leave us with the actual data
|
// Remove the first row to leave us with the actual data
|
||||||
|
|||||||
Reference in New Issue
Block a user