rename widget
This commit is contained in:
parent
163dcc222d
commit
66f8c5f904
|
@ -2,12 +2,12 @@
|
|||
|
||||
require_once('MockPress/mockpress.php');
|
||||
require_once('PHPUnit/Framework.php');
|
||||
require_once(dirname(__FILE__) . '/../../widgets/graphical-navigation.php');
|
||||
require_once(dirname(__FILE__) . '/../../widgets/GraphicalNavigationWidget.inc');
|
||||
|
||||
class GraphicalNavigationTest extends PHPUnit_Framework_TestCase {
|
||||
class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase {
|
||||
function setUp() {
|
||||
_reset_wp();
|
||||
$this->w = new WidgetComicPressGraphicalStorylineNavigation();
|
||||
$this->w = new GraphicalNavigationWidget();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,7 +121,7 @@ class GraphicalNavigationTest extends PHPUnit_Framework_TestCase {
|
|||
|
||||
$post = 'post';
|
||||
|
||||
$css = $this->getMock('WidgetComicPressGraphicalStorylineNavigation', array('_new_comicpress_storyline', '_new_comicpress_navigation'));
|
||||
$css = $this->getMock('GraphicalNavigationWidget', array('_new_comicpress_storyline', '_new_comicpress_navigation'));
|
||||
|
||||
update_option('comicpress-storyline-category-order', 'test');
|
||||
|
|
@ -10,8 +10,8 @@ Author URI: http://frumph.net/
|
|||
|
||||
require_once(dirname(__FILE__) . '/../classes/ComicPressNavigation.inc');
|
||||
|
||||
class WidgetComicPressGraphicalStorylineNavigation extends WP_Widget {
|
||||
function WidgetComicPressGraphicalStorylineNavigation() {
|
||||
class GraphicalNavigationWidget extends WP_Widget {
|
||||
function GraphicalNavigationWidget() {
|
||||
$widget_ops = array('classname' => 'WidgetComicPressGraphicalStorylineNavigation', 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') );
|
||||
$this->WP_Widget('graphicalstorylinenavigation', __('Comic Navigation','comicpress'), $widget_ops);
|
||||
}
|
||||
|
@ -445,19 +445,3 @@ class WidgetComicPressGraphicalStorylineNavigation extends WP_Widget {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
register_widget('WidgetComicPressGraphicalStorylineNavigation');
|
||||
|
||||
/**
|
||||
* Handle pre-init stuff.
|
||||
* In this case, instantiate a copy of the widget and hook up its filters.
|
||||
* The original will hang around due to the callback references. Don't use any
|
||||
* object properties in those filters!
|
||||
*/
|
||||
function WidgetComicPressGraphicalStorylineNavigation_init() {
|
||||
$a = new WidgetComicPressGraphicalStorylineNavigation();
|
||||
$a->init();
|
||||
}
|
||||
|
||||
add_action('widgets_init', 'WidgetComicPressGraphicalStorylineNavigation_init');
|
||||
|
||||
?>
|
Loading…
Reference in New Issue