fix issue with trying to call is_active on objects w/o method

This commit is contained in:
John Bintz 2009-12-20 22:55:18 -05:00
parent 657080c990
commit 3e84f9d36b
1 changed files with 5 additions and 3 deletions

View File

@ -29,6 +29,7 @@ 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 (method_exists($widget, 'is_active')) {
if (strpos(strtolower($widget_id), $key) === 0) { if (strpos(strtolower($widget_id), $key) === 0) {
$widget->is_active(); $widget->is_active();
} }
@ -36,6 +37,7 @@ function __comicpress_widgets_init() {
} }
} }
} }
}
} }
function __comicpress_init() { function __comicpress_init() {