diff --git a/functions/checkbrowser.php b/functions/checkbrowser.php
deleted file mode 100644
index 7ac7fd1..0000000
--- a/functions/checkbrowser.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/functions/rawformatting.php b/functions/rawformatting.php
deleted file mode 100644
index 7ac7fd1..0000000
--- a/functions/rawformatting.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/functions/shortcodes.php b/functions/shortcodes.php
new file mode 100644
index 0000000..1fb03c5
--- /dev/null
+++ b/functions/shortcodes.php
@@ -0,0 +1,10 @@
+'.$comicpress_version['comicpress_version'].'';
+}
+
+?>
\ No newline at end of file
diff --git a/functions/userpages.php b/functions/userpages.php
deleted file mode 100644
index 7ac7fd1..0000000
--- a/functions/userpages.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
\ No newline at end of file
diff --git a/widgets/BuyPrintWidget.inc b/widgets/BuyPrintWidget.inc
new file mode 100644
index 0000000..3042768
--- /dev/null
+++ b/widgets/BuyPrintWidget.inc
@@ -0,0 +1,63 @@
+ __CLASS__, 'description' => __('Adds a button that goes to the buy print template page.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Buy This Print','comicpress'), $widget_ops);
+ }
+ }
+
+ function init() {
+ add_filter('comicpress_buy_print_structure', array(&$this, 'buy_print_structure'));
+ }
+
+ function widget($args, $instance) {
+ extract($args, EXTR_SKIP);
+
+ echo $before_widget;
+ $title = apply_filters('widget_title', $instance['title']);
+ if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
+
+ if ( get_post_meta( get_the_ID(), "buythiscomic", true ) !== 'sold' ) {
+ echo apply_filters('comicpress_buy_print_structure', '');
+ }
+
+ echo $after_widget;
+ }
+
+ function buy_print_structure($content = '') {
+ $comicpress_options = comicpress_load_options(); ?>
+
+
+ '' ) );
+ $title = strip_tags($instance['title']);
+ ?>
+
+ __CLASS__, 'description' => __('Displays the comic blog post, ..used to be around the comic areas.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Comic Blog Post','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ global $post, $wp_query;
+ if (is_home() || is_single()) {
+ extract($args, EXTR_SKIP);
+ if (!empty($post->post_content)) {
+ echo $before_widget;
+ $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
+ if ( !empty( $title ) ) { echo '
'.$title.'
'; }
+
+ display_comic_post();
+ echo $after_widget;
+ }
+ }
+ }
+
+ function update($new_instance, $old_instance) {
+ $instance = $old_instance;
+ $instance['title'] = strip_tags($new_instance['title']);
+ return $instance;
+ }
+
+ function form($instance) {
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
+ $title = strip_tags($instance['title']);
+ ?>
+
+
+
\ No newline at end of file
diff --git a/widgets/ComicDateWidget.inc b/widgets/ComicDateWidget.inc
new file mode 100644
index 0000000..bc2412b
--- /dev/null
+++ b/widgets/ComicDateWidget.inc
@@ -0,0 +1,53 @@
+ __CLASS__, 'description' => __('Displays the date of the post of the comic.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Comic Date','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 $title; } ?>
+ '', 'format' => '' ) );
+ $title = strip_tags($instance['title']);
+ $format = strip_tags($instance['format']);
+ if (empty($format)) $format = 'F jS, Y';
+ ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/widgets/ComicTitleWidget.inc b/widgets/ComicTitleWidget.inc
new file mode 100644
index 0000000..b93caa4
--- /dev/null
+++ b/widgets/ComicTitleWidget.inc
@@ -0,0 +1,39 @@
+ __CLASS__, 'description' => __('Displays the title of the comic. (used in comic sidebars)','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Comic Title','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ global $post;
+ extract($args, EXTR_SKIP);
+
+ echo $before_widget;?>
+
+
\ No newline at end of file
diff --git a/widgets/CommentsWidget.inc b/widgets/CommentsWidget.inc
new file mode 100644
index 0000000..f2589fe
--- /dev/null
+++ b/widgets/CommentsWidget.inc
@@ -0,0 +1,55 @@
+ __CLASS__, 'description' => __('Displays a comments link. (used in comic sidebars)','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Comic Comments','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ global $post;
+ extract($args, EXTR_SKIP);
+
+ echo $before_widget;
+ $title = empty($instance['title']) ? __('Permalink','comicpress') : apply_filters('widget_title', $instance['title']); ?>
+ comment_status) { ?>
”Comment ', '1Comment ', '%Comment '); ?>
+ '') );
+ $title = strip_tags($instance['title']);
+ ?>
+
+
\ No newline at end of file
diff --git a/widgets/ControlPanelWidget.inc b/widgets/ControlPanelWidget.inc
new file mode 100644
index 0000000..3096227
--- /dev/null
+++ b/widgets/ControlPanelWidget.inc
@@ -0,0 +1,82 @@
+ __CLASS__, 'description' => __('Login/Logoff menu with register/lost password links if not logged on. (use only if registrations are enabled.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Control Panel','comicpress'), $widget_ops);
+ }
+ }
+
+ function comicpress_show_control_panel() {
+ global $wpmu_version; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ comicpress_show_control_panel();
+ echo $after_widget;
+ }
+
+ function update($new_instance, $old_instance) {
+ $instance = $old_instance;
+ $instance['title'] = strip_tags($new_instance['title']);
+ return $instance;
+ }
+
+ function form($instance) {
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
+ $title = strip_tags($instance['title']);
+ ?>
+
+
\ No newline at end of file
diff --git a/widgets/LatestThumbnailWidget.inc b/widgets/LatestThumbnailWidget.inc
new file mode 100644
index 0000000..e3d831b
--- /dev/null
+++ b/widgets/LatestThumbnailWidget.inc
@@ -0,0 +1,62 @@
+ __CLASS__, 'description' => __('Display a thumbnail of the latest comic, clickable to go to the comic post.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Latest Thumbnail','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ global $post;
+ if (is_home()) {
+ extract($args, EXTR_SKIP);
+
+ echo $before_widget;
+ $title = empty($instance['title']) ? __('Latest Comic','comicpress') : apply_filters('widget_title', $instance['title']);
+ if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
+ $latestcomics = get_posts('numberposts=1&category='.get_all_comic_categories_as_cat_string());
+ $archive_image = null;
+
+ foreach($latestcomics as $post) :
+ foreach (array("archive", "rss", "mini", "comic") as $type) {
+ if (($requested_archive_image = get_comic_url($type, $post)) !== false) {
+ $archive_image = $requested_archive_image; break;
+ }
+ } ?>
+
+
+
+
+ '' ) );
+ $title = strip_tags($instance['title']);
+ ?>
+
+
\ No newline at end of file
diff --git a/widgets/NonMemberTextWidget.inc b/widgets/NonMemberTextWidget.inc
new file mode 100644
index 0000000..2033b8e
--- /dev/null
+++ b/widgets/NonMemberTextWidget.inc
@@ -0,0 +1,50 @@
+ __CLASS__, 'description' => __('Displays Whatever is in the text box to non-members only.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Non-Member Text','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ global $post, $wp_query;
+ if (!comicpress_is_member()) {
+ extract($args, EXTR_SKIP);
+ echo $before_widget;
+ $title = empty($instance['title']) ? '': apply_filters('widget_title', $instance['title']);
+ echo stripslashes($instance['textinfo']);
+ echo $after_widget;
+ }
+ }
+
+ function update($new_instance, $old_instance) {
+ $instance = $old_instance;
+ $instance['title'] = strip_tags($new_instance['title']);
+ $instance['textinfo'] = addslashes($new_instance['textinfo']);
+ return $instance;
+ }
+
+ function form($instance) {
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '' , 'textinfo' => '') );
+ $title = strip_tags($instance['title']);
+ $textinfo = stripslashes($instance['textinfo']);
+ ?>
+
+
+
\ No newline at end of file
diff --git a/widgets/PermalinkWidget.inc b/widgets/PermalinkWidget.inc
new file mode 100644
index 0000000..e31b390
--- /dev/null
+++ b/widgets/PermalinkWidget.inc
@@ -0,0 +1,51 @@
+ __CLASS__, 'description' => __('Displays a permalink. (used in comic sidebars)','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Permalink','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']); ?>
+
+ '' , 'comment' => '') );
+ $title = strip_tags($instance['title']);
+ $comment = strip_tags($instance['comment']);
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/widgets/ScheduledPostsWidget.inc b/widgets/ScheduledPostsWidget.inc
new file mode 100644
index 0000000..6541842
--- /dev/null
+++ b/widgets/ScheduledPostsWidget.inc
@@ -0,0 +1,57 @@
+ __CLASS__, 'description' => __('Display a list of posts that are scheduled to be published.','comicpress') );
+ $this->WP_Widget(__CLASS__, __('ComicPress Scheduled Posts','comicpress'), $widget_ops);
+ }
+ }
+
+ function widget($args, $instance) {
+ extract($args, EXTR_SKIP);
+
+ echo '