fix issue with trying to call is_active on objects w/o method
This commit is contained in:
parent
657080c990
commit
3e84f9d36b
|
@ -29,8 +29,10 @@ function __comicpress_widgets_init() {
|
||||||
if ($type != 'wp_inactive_widgets') {
|
if ($type != 'wp_inactive_widgets') {
|
||||||
foreach ($widgets as $widget_id) {
|
foreach ($widgets as $widget_id) {
|
||||||
foreach ($available_widgets as $key => $widget) {
|
foreach ($available_widgets as $key => $widget) {
|
||||||
if (strpos(strtolower($widget_id), $key) === 0) {
|
if (method_exists($widget, 'is_active')) {
|
||||||
$widget->is_active();
|
if (strpos(strtolower($widget_id), $key) === 0) {
|
||||||
|
$widget->is_active();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue