Apply "Reverse Teams" to event listing in dashboard
This commit is contained in:
@@ -174,6 +174,10 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
$teams = (array)get_post_meta( $post_id, 'sp_team', false );
|
$teams = (array)get_post_meta( $post_id, 'sp_team', false );
|
||||||
$teams = array_filter( $teams );
|
$teams = array_filter( $teams );
|
||||||
$teams = array_unique( $teams );
|
$teams = array_unique( $teams );
|
||||||
|
$reverse_teams = get_option( 'sportspress_event_reverse_teams', 'no' ) === 'yes' ? true : false;
|
||||||
|
if ( $reverse_teams ) {
|
||||||
|
$teams = array_reverse( $teams , true );
|
||||||
|
}
|
||||||
if ( empty( $teams ) ):
|
if ( empty( $teams ) ):
|
||||||
echo '—';
|
echo '—';
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user