Fix event performance subs
This commit is contained in:
@@ -55,10 +55,16 @@ class SP_Event extends SP_Custom_Post{
|
|||||||
$lineup = array_filter( $data, array( $this, 'lineup_filter' ) );
|
$lineup = array_filter( $data, array( $this, 'lineup_filter' ) );
|
||||||
$subs = array_filter( $data, array( $this, 'sub_filter' ) );
|
$subs = array_filter( $data, array( $this, 'sub_filter' ) );
|
||||||
|
|
||||||
foreach ( $subs as $sub_id => $sub ):
|
foreach ( $subs as $player_id => $player ):
|
||||||
if ( ! $sub_id )
|
if ( ! $player_id )
|
||||||
continue;
|
continue;
|
||||||
$lineup[ sp_array_value( $sub, 'sub', 0 ) ]['sub'] = $sub_id;
|
|
||||||
|
$sub = sp_array_value( $player, 'sub', 0 );
|
||||||
|
|
||||||
|
if ( ! $sub )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$lineup[ $sub ]['sub'] = $player_id;
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
$output[ $team_id ] = array(
|
$output[ $team_id ] = array(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Tags: sport, sports, press, club, sport statistics, sports management, soccer, f
|
|||||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress
|
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress
|
||||||
Requires at least: 3.8
|
Requires at least: 3.8
|
||||||
Tested up to: 3.9
|
Tested up to: 3.9
|
||||||
Stable tag: 0.8.5
|
Stable tag: 0.8.6
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user