diff --git a/illustrated-recent-posts-widget.php b/illustrated-recent-posts-widget.php
index c4334d4..9c4fff5 100644
--- a/illustrated-recent-posts-widget.php
+++ b/illustrated-recent-posts-widget.php
@@ -105,7 +105,23 @@ class Illustrated_Recent_Posts_Widget extends WP_Widget {
$title = isset($instance['title']) ? esc_attr($instance['title']) : 'Recent Posts';
$number = isset($instance['number']) ? absint($instance['number']) : 5;
$show_date = isset( $instance['show_date'] ) ? (bool) $instance['show_date'] : false;
+ $cats_instance = $instance['cats'];
+ $option_base ='term_id); };
+ return (count(array_filter($cats_instance, $is_a_cat)) > 0);
+ };
+
+ $reduce_categories = function($result, $c) use ($isChecked, $option_base) {
+ $checked = ($isChecked($c)) ? ' checked="checked"' : '';
+ if ($result == NULL) {
+ return $option_base . $checked . ' value="' . $c->term_id.'" /> ' . $c->cat_name . '
';
+ }
+ return $result . $option_base . $checked . ' value="' . $c->term_id.'" /> ' . $c->cat_name . '
';
+ };
?>
+
@@ -115,22 +131,10 @@ class Illustrated_Recent_Posts_Widget extends WP_Widget {
+