From 3e460868036cef29c5dfbedae88ee4e6074fd35a Mon Sep 17 00:00:00 2001 From: Ken Elf Mathieu Sternberg Date: Wed, 13 Mar 2013 11:37:20 -0700 Subject: [PATCH] Zuut. Fixed problem with closure not being passed forward on instances. --- illustrated-recent-posts-widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/illustrated-recent-posts-widget.php b/illustrated-recent-posts-widget.php index 9c4fff5..5fd7b2d 100644 --- a/illustrated-recent-posts-widget.php +++ b/illustrated-recent-posts-widget.php @@ -109,7 +109,7 @@ class Illustrated_Recent_Posts_Widget extends WP_Widget { $option_base ='term_id); }; + $is_a_cat = function($ic) use ($c) { return ($ic == $c->term_id); }; return (count(array_filter($cats_instance, $is_a_cat)) > 0); };