diff --git a/test/widgets/DisplayComicTitleWidgetTest.php b/test/widgets/DisplayComicTitleWidgetTest.php new file mode 100644 index 0000000..d2ab470 --- /dev/null +++ b/test/widgets/DisplayComicTitleWidgetTest.php @@ -0,0 +1,24 @@ + 'title', + 'guid' => 'link' + ); + + $w = new DisplayComicTitleWidget(); + + ob_start(); + $w->widget(array('before_widget' => '', 'after_widget' => ''), array()); + $result = ob_get_clean(); + + $this->assertEquals('title', $result); + } +} diff --git a/widgets/DisplayComicTitleWidget.inc b/widgets/DisplayComicTitleWidget.inc new file mode 100644 index 0000000..29d4c4b --- /dev/null +++ b/widgets/DisplayComicTitleWidget.inc @@ -0,0 +1,25 @@ + 'DisplayComicTitleWidget', 'description' => __('Displays the title of the comic. (used in comic sidebars)','comicpress') ); + $this->WP_Widget('comictitle', __('Comic Title','comicpress'), $widget_ops); + } + + function widget($args, $instance) { + extract($args, EXTR_SKIP); + + echo $before_widget; + ?> 'widget_comicpress_comictitle', 'description' => __('Displays the title of the comic. (used in comic sidebars)','comicpress') ); - $this->WP_Widget('comictitle', __('Comic Title','comicpress'), $widget_ops); - } - - function widget($args, $instance) { - global $post; - extract($args, EXTR_SKIP); - - echo $before_widget;?> - - \ No newline at end of file