diff --git a/widgets/ArchiveDropdownWidget.inc b/widgets/ArchiveDropdownWidget.inc index 2180930..ece03dd 100644 --- a/widgets/ArchiveDropdownWidget.inc +++ b/widgets/ArchiveDropdownWidget.inc @@ -35,7 +35,7 @@ class ComicPressArchiveDropdownWidget extends WP_Widget { function _verify_nonce() { return __comicpress_verify_nonce(); } function template_redirect() { - if (ArchiveDropdownWidget::_verify_nonce() == 'follow-archive-dropdown') { + if (ComicPressArchiveDropdownWidget::_verify_nonce() == 'follow-archive-dropdown') { wp_redirect($_GET['cp']['urls']); } } @@ -242,4 +242,4 @@ class ComicPressArchiveDropdownWidget extends WP_Widget { } } -add_action('template_redirect', array('ArchiveDropdownWidget', 'template_redirect')); +add_action('template_redirect', array('ComicPressArchiveDropdownWidget', 'template_redirect')); diff --git a/widgets/LatestComicLink.inc b/widgets/LatestComicLink.inc new file mode 100644 index 0000000..1ef451c --- /dev/null +++ b/widgets/LatestComicLink.inc @@ -0,0 +1,48 @@ + __CLASS__, 'description' => __('Displays a link to click to go to the latest comic.','comicpress') ); + $this->WP_Widget(__CLASS__, __('ComicPress Latest Comic Link','comicpress'), $widget_ops); + } + } + + function widget($args, $instance) { + global $post; + extract($args, EXTR_SKIP); + + echo $before_widget; + $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> +

? Latest Comic

+ '' ) ); + $title = strip_tags($instance['title']); + ?> +

+ \ No newline at end of file diff --git a/widgets/LatestComicLinkWidget.inc b/widgets/LatestComicLinkWidget.inc new file mode 100644 index 0000000..8c38504 --- /dev/null +++ b/widgets/LatestComicLinkWidget.inc @@ -0,0 +1,48 @@ + __CLASS__, 'description' => __('Displays a link to click to go to the latest comic.','comicpress') ); + $this->WP_Widget(__CLASS__, __('ComicPress Latest Comic Link','comicpress'), $widget_ops); + } + } + + function widget($args, $instance) { + global $post; + extract($args, EXTR_SKIP); + + echo $before_widget; + $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> +

? Latest Comic

+ '' ) ); + $title = strip_tags($instance['title']); + ?> +

+ \ No newline at end of file diff --git a/widgets/RandomComicLinkWidget.inc b/widgets/RandomComicLinkWidget.inc new file mode 100644 index 0000000..0b4e2a1 --- /dev/null +++ b/widgets/RandomComicLinkWidget.inc @@ -0,0 +1,48 @@ + __CLASS__, 'description' => __('Displays a link to click to trigger a random comic.','comicpress') ); + $this->WP_Widget(__CLASS__, __('ComicPress Random Comic Link','comicpress'), $widget_ops); + } + } + + function widget($args, $instance) { + global $post; + extract($args, EXTR_SKIP); + + echo $before_widget; + $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> +

?

+ '' ) ); + $title = strip_tags($instance['title']); + ?> +

+ \ No newline at end of file diff --git a/widgets/RandomPostLinkWidget.inc b/widgets/RandomPostLinkWidget.inc new file mode 100644 index 0000000..d21cb02 --- /dev/null +++ b/widgets/RandomPostLinkWidget.inc @@ -0,0 +1,48 @@ + __CLASS__, 'description' => __('Displays a link to click to trigger a random blog post.','comicpress') ); + $this->WP_Widget(__CLASS__, __('ComicPress Random Post Link','comicpress'), $widget_ops); + } + } + + function widget($args, $instance) { + global $post; + extract($args, EXTR_SKIP); + + echo $before_widget; + $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?> +

?

+ '' ) ); + $title = strip_tags($instance['title']); + ?> +

+ \ No newline at end of file