From f8e11e252bbd31be19543396196d4e26ecd998d9 Mon Sep 17 00:00:00 2001 From: NickHeurter Date: Thu, 9 Jun 2016 15:01:15 +0200 Subject: [PATCH] Update widget.php Save Meta Key and Meta Value to sort posts by Meta Key --- classes/widget.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/widget.php b/classes/widget.php index 6f0b22f..7a43b2d 100644 --- a/classes/widget.php +++ b/classes/widget.php @@ -110,6 +110,8 @@ public function update( $new_instance, $old_instance ) { $instance['cat'] = $new_instance['cat']; $instance['tag'] = $new_instance['tag']; $instance['taxonomy'] = esc_attr( $new_instance['taxonomy'] ); + $instance['meta_key'] = esc_attr( $new_instance['meta_key'] ); + $instance['meta_value'] = esc_attr( $new_instance['meta_value'] ); $instance['excerpt'] = isset( $new_instance['excerpt'] ) ? (bool) $new_instance['excerpt'] : false; $instance['length'] = intval( $new_instance['length'] );