From 63ebb4485d1de86116edfb44e05de592459c2778 Mon Sep 17 00:00:00 2001 From: Poul Hornsleth Date: Thu, 9 Aug 2018 11:13:21 -0400 Subject: [PATCH] Add date filtering by Future/Past dates, and adjustment of the 'now' date. Defaults to current behavior --- classes/widget.php | 2 ++ includes/form.php | 21 +++++++++++++++++++++ includes/functions.php | 4 ++++ 3 files changed, 27 insertions(+) diff --git a/classes/widget.php b/classes/widget.php index 6f0b22f..ea30b48 100644 --- a/classes/widget.php +++ b/classes/widget.php @@ -105,6 +105,8 @@ public function update( $new_instance, $old_instance ) { $instance['offset'] = intval( $new_instance['offset'] ); $instance['order'] = stripslashes( $new_instance['order'] ); $instance['orderby'] = stripslashes( $new_instance['orderby'] ); + $instance['date_filter'] = stripslashes( $new_instance['date_filter'] ); + $instance['date_filter_adj'] = intval( $new_instance['date_filter_adj'] ); $instance['post_type'] = $types; $instance['post_status'] = stripslashes( $new_instance['post_status'] ); $instance['cat'] = $new_instance['cat']; diff --git a/includes/form.php b/includes/form.php index a99226f..4db2a1a 100644 --- a/includes/form.php +++ b/includes/form.php @@ -125,6 +125,27 @@

+

+ + +

+ +

+ + + +

+ + +