Zuut. Fixed problem with closure not being passed forward on instances.
This commit is contained in:
parent
55453c8731
commit
3e46086803
|
@ -109,7 +109,7 @@ class Illustrated_Recent_Posts_Widget extends WP_Widget {
|
||||||
$option_base ='<input type="checkbox" id="'. $this->get_field_id('cats') .'[]" name="'. $this->get_field_name('cats') .'[]"';
|
$option_base ='<input type="checkbox" id="'. $this->get_field_id('cats') .'[]" name="'. $this->get_field_name('cats') .'[]"';
|
||||||
|
|
||||||
$isChecked = function($c) use ($cats_instance) {
|
$isChecked = function($c) use ($cats_instance) {
|
||||||
$is_a_cat = function($ic) { return ($ic == $c->term_id); };
|
$is_a_cat = function($ic) use ($c) { return ($ic == $c->term_id); };
|
||||||
return (count(array_filter($cats_instance, $is_a_cat)) > 0);
|
return (count(array_filter($cats_instance, $is_a_cat)) > 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue