From 6023e03ce00d81f05751e5ded14eddb7b39ed747 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 21 Dec 2009 14:50:17 -0500 Subject: [PATCH] fix for blank mode --- widgets/BookmarkWidget.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/widgets/BookmarkWidget.inc b/widgets/BookmarkWidget.inc index 6b9ba95..ec7b2fe 100644 --- a/widgets/BookmarkWidget.inc +++ b/widgets/BookmarkWidget.inc @@ -154,6 +154,8 @@ class BookmarkWidget extends WP_Widget { $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); if (!empty($title)) { echo $before_title . $title . $after_title; }; + $mode = !isset($this->text_fields[$instance['mode']]) ? array_shift(array_keys($this->text_fields)) : $instance['mode']; + $link = is_home() ? get_bloginfo('url') : get_permalink($post); $id = 'comic-bookmark-' . md5(rand()); @@ -173,10 +175,10 @@ class BookmarkWidget extends WP_Widget { } ?>