Prevent parse errors
This commit is contained in:
@@ -705,7 +705,7 @@ class SP_Event extends SP_Custom_Post{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function sort_timeline( $a, $b ) {
|
public function sort_timeline( $a, $b ) {
|
||||||
return $a['time'] - $b['time'];
|
return (float) $a['time'] - (float) $b['time'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ foreach ( $leagues as $key => $league ) {
|
|||||||
$leagues[ $key ]->sp_order = get_term_meta ( $league->term_id , 'sp_order', true );
|
$leagues[ $key ]->sp_order = get_term_meta ( $league->term_id , 'sp_order', true );
|
||||||
}
|
}
|
||||||
function sortByOrder($a, $b) {
|
function sortByOrder($a, $b) {
|
||||||
return $a->sp_order - $b->sp_order;
|
return (int) $a->sp_order - (int) $b->sp_order;
|
||||||
}
|
}
|
||||||
usort($leagues, 'sortByOrder');
|
usort($leagues, 'sortByOrder');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user