diff --git a/test/widgets/BuyThisPrintWidgetTest.php b/test/widgets/BuyThisPrintWidgetTest.php index 4da9c11..26b5bf1 100644 --- a/test/widgets/BuyThisPrintWidgetTest.php +++ b/test/widgets/BuyThisPrintWidgetTest.php @@ -2,12 +2,12 @@ require_once('PHPUnit/Framework.php'); require_once('MockPress/mockpress.php'); -require_once(dirname(__FILE__) . '/../../widgets/BuyThisPrintWidget.inc'); +require_once(dirname(__FILE__) . '/../../widgets/BuyPrintWidget.inc'); class BuyThisPrintWidgetTest extends PHPUnit_Framework_TestCase { function setUp() { _reset_wp(); - $this->w = new BuyThisPrintWidget('id', 'name', array()); + $this->w = new ComicPressBuyPrintWidget('id', 'name', array()); } function providerTestUpdate() { diff --git a/test/widgets/CalendarWidgetTest.php b/test/widgets/CalendarWidgetTest.php index 2b87867..7214c81 100644 --- a/test/widgets/CalendarWidgetTest.php +++ b/test/widgets/CalendarWidgetTest.php @@ -7,7 +7,7 @@ require_once(dirname(__FILE__) . '/../../widgets/CalendarWidget.inc'); class CalendarWidgetTest extends PHPUnit_Framework_TestCase { function setUp() { _reset_wp(); - $this->w = new CalendarWidget('id', 'name', array()); + $this->w = new ComicPressCalendarWidget('id', 'name', array()); } function providerTestUpdate() { diff --git a/test/widgets/GraphicalNavigationWidgetTest.php b/test/widgets/GraphicalNavigationWidgetTest.php index 709acf4..7d07c6d 100644 --- a/test/widgets/GraphicalNavigationWidgetTest.php +++ b/test/widgets/GraphicalNavigationWidgetTest.php @@ -7,7 +7,7 @@ require_once(dirname(__FILE__) . '/../../widgets/GraphicalNavigationWidget.inc') class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase { function setUp() { _reset_wp(); - $this->w = new GraphicalNavigationWidget(); + $this->w = new ComicPressGraphicalNavigationWidget(); } function testUpdateWidget() { @@ -120,7 +120,7 @@ class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase { $post = 'post'; - $css = $this->getMock('GraphicalNavigationWidget', array('_new_comicpress_storyline', '_new_comicpress_navigation')); + $css = $this->getMock('ComicPressGraphicalNavigationWidget', array('_new_comicpress_storyline', '_new_comicpress_navigation')); update_option('comicpress-storyline-category-order', 'test'); diff --git a/widgets/GraphicalNavigationWidget.inc b/widgets/GraphicalNavigationWidget.inc index 7f399f0..600db51 100644 --- a/widgets/GraphicalNavigationWidget.inc +++ b/widgets/GraphicalNavigationWidget.inc @@ -11,7 +11,7 @@ Author URI: http://frumph.net/ require_once(dirname(__FILE__) . '/../classes/ComicPressNavigation.inc'); class ComicPressGraphicalNavigationWidget extends WP_Widget { - + function ComicPressGraphicalNavigationWidget($skip_widget_init = false) { if (!$skip_widget_init) { $widget_ops = array('classname' => __CLASS__, 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') ); @@ -303,10 +303,8 @@ class ComicPressGraphicalNavigationWidget extends WP_Widget { } function comicpress_set_up_post_nav($post_nav, $instance) { - if ($instance['story_prev_acts_as_prev_in'] == 'on') { - if ($post_nav['storyline-previous'] !== false) { - $post_nav['storyline-chapter-previous'] = $post_nav['storyline-previous']; - } + if ($post_nav['storyline-previous'] !== false) { + $post_nav['storyline-chapter-previous'] = $post_nav['storyline-previous']; } return array($post_nav, $instance); } @@ -322,8 +320,7 @@ class ComicPressGraphicalNavigationWidget extends WP_Widget { $all_fields = array( 'first', 'story_prev', 'story_next', 'story_prev_in', 'story_next_in', 'previous', 'random', 'archives', - 'comments', 'next', 'last', 'buyprint', 'comictitle', 'lastgohome', - 'story_prev_acts_as_prev_in' + 'comments', 'next', 'last', 'buyprint', 'comictitle', 'lastgohome' ); foreach ($all_fields as $field) { @@ -354,8 +351,7 @@ class ComicPressGraphicalNavigationWidget extends WP_Widget { 'archive_path' => '', 'buyprint' => 'off', 'comictitle' => 'off', - 'lastgohome' => 'off', - 'story_prev_acts_as_prev_in' => 'on' + 'lastgohome' => 'off' ); $title_defaults = array( @@ -431,21 +427,6 @@ class ComicPressGraphicalNavigationWidget extends WP_Widget { -
- -
-