Merge branch 'master' of https://github.com/ThemeBoy/SportsPress
This commit is contained in:
@@ -374,6 +374,24 @@ class SP_Player_List extends SP_Secondary_Post {
|
|||||||
'terms' => $season_ids
|
'terms' => $season_ids
|
||||||
);
|
);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
$team_key = 'sp_team';
|
||||||
|
if ( $team ):
|
||||||
|
switch ( $era ):
|
||||||
|
case 'current':
|
||||||
|
$team_key = 'sp_current_team';
|
||||||
|
break;
|
||||||
|
case 'past':
|
||||||
|
$team_key = 'sp_past_team';
|
||||||
|
break;
|
||||||
|
endswitch;
|
||||||
|
$args['meta_query'][] = array(
|
||||||
|
array(
|
||||||
|
'key' => $team_key,
|
||||||
|
'value' => $team
|
||||||
|
),
|
||||||
|
);
|
||||||
|
endif;
|
||||||
|
|
||||||
if ( $this->date !== 0 ):
|
if ( $this->date !== 0 ):
|
||||||
if ( $this->date == 'w' ):
|
if ( $this->date == 'w' ):
|
||||||
@@ -412,6 +430,7 @@ class SP_Player_List extends SP_Secondary_Post {
|
|||||||
|
|
||||||
// Add all team performance
|
// Add all team performance
|
||||||
if ( is_array( $team_performance ) ): foreach ( $team_performance as $team_id => $players ):
|
if ( is_array( $team_performance ) ): foreach ( $team_performance as $team_id => $players ):
|
||||||
|
if ( $team && $team_id != $team ) continue;
|
||||||
if ( is_array( $players ) ): foreach ( $players as $player_id => $player_performance ):
|
if ( is_array( $players ) ): foreach ( $players as $player_id => $player_performance ):
|
||||||
if ( array_key_exists( $player_id, $totals ) && is_array( $totals[ $player_id ] ) ):
|
if ( array_key_exists( $player_id, $totals ) && is_array( $totals[ $player_id ] ) ):
|
||||||
|
|
||||||
|
|||||||
@@ -802,13 +802,9 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
|
|
||||||
$labels = array();
|
$labels = array();
|
||||||
|
|
||||||
if ( 'no' === get_option( 'sportspress_player_show_statistics', 'yes' ) ) {
|
$labels['name'] = __( 'Season', 'sportspress' );
|
||||||
$merged = array();
|
$labels['team'] = __( 'Team', 'sportspress' );
|
||||||
} else {
|
|
||||||
$labels['name'] = __( 'Season', 'sportspress' );
|
|
||||||
$labels['team'] = __( 'Team', 'sportspress' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( 'no' === get_option( 'sportspress_player_show_total', 'no' ) ) {
|
if ( 'no' === get_option( 'sportspress_player_show_total', 'no' ) ) {
|
||||||
unset( $merged[-1] );
|
unset( $merged[-1] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ if ( $title )
|
|||||||
<tr class="sp-row sp-post<?php echo ( $i % 2 == 0 ? ' alternate' : '' ); ?>" itemscope itemtype="http://schema.org/SportsEvent">
|
<tr class="sp-row sp-post<?php echo ( $i % 2 == 0 ? ' alternate' : '' ); ?>" itemscope itemtype="http://schema.org/SportsEvent">
|
||||||
<td>
|
<td>
|
||||||
<?php do_action( 'sportspress_event_blocks_before', $event, $usecolumns ); ?>
|
<?php do_action( 'sportspress_event_blocks_before', $event, $usecolumns ); ?>
|
||||||
<?php echo implode( $logos, ' ' ); ?>
|
<?php echo implode( ' ', $logos ); ?>
|
||||||
<time class="sp-event-date" datetime="<?php echo $event->post_date; ?>" itemprop="startDate" content="<?php echo mysql2date( 'Y-m-d\TH:iP', $event->post_date ); ?>">
|
<time class="sp-event-date" datetime="<?php echo $event->post_date; ?>" itemprop="startDate" content="<?php echo mysql2date( 'Y-m-d\TH:iP', $event->post_date ); ?>">
|
||||||
<?php echo sp_add_link( get_the_time( get_option( 'date_format' ), $event ), $permalink, $link_events ); ?>
|
<?php echo sp_add_link( get_the_time( get_option( 'date_format' ), $event ), $permalink, $link_events ); ?>
|
||||||
</time>
|
</time>
|
||||||
|
|||||||
Reference in New Issue
Block a user