Add "Order" and "Order by" selection fields for countdown widget

This commit is contained in:
savvasha
2021-03-31 12:38:56 +03:00
parent c4cbc5e97c
commit 775ac5cb2f
2 changed files with 33 additions and 3 deletions

View File

@@ -12,6 +12,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$defaults = array(
'team' => null,
'calendar' => null,
'order' => null,
'orderby' => null,
'league' => null,
'season' => null,
'id' => null,
@@ -40,7 +42,14 @@ elseif ( $calendar ):
if ( $team )
$calendar->team = $team;
$calendar->status = 'future';
$calendar->order = 'ASC';
if ( $order ) {
$calendar->order = $order;
}else{
$calendar->order = 'ASC';
}
if ( $orderby ) {
$calendar->orderby = $orderby;
}
$data = $calendar->data();
/**