From 25d13f4a4da5f6e79194b766ce881cc4636631ca Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Thu, 20 Sep 2012 10:30:48 -0600 Subject: [PATCH] Simplify updating instance --- lib/widgets.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/widgets.php b/lib/widgets.php index f9acd54..98e7c6b 100644 --- a/lib/widgets.php +++ b/lib/widgets.php @@ -98,11 +98,7 @@ class Roots_Vcard_Widget extends WP_Widget { } function update($new_instance, $old_instance) { - $instance = $old_instance; - - foreach($this->fields as $name => $label) { - $instance[$name] = strip_tags($new_instance[$name]); - } + $instance = array_map('strip_tags', $new_instance); $this->flush_widget_cache();