From 2f1ce5e04f97c9e574b45132a687a3437a59cbe0 Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Thu, 27 Aug 2009 16:22:17 -0700 Subject: [PATCH] comic blog post widgets/comicblogpost.php Signed-off-by: Philip M. Hofer (Frumph) --- functions.php | 1 + style.css | 1 + widgets/comicblogpost.php | 54 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 widgets/comicblogpost.php diff --git a/functions.php b/functions.php index a6d250d..0dc1b7b 100644 --- a/functions.php +++ b/functions.php @@ -121,6 +121,7 @@ require_once(get_template_directory() . '/widgets/comictitle.php'); require_once(get_template_directory() . '/widgets/comiccomments.php'); require_once(get_template_directory() . '/widgets/menubar.php'); require_once(get_template_directory() . '/widgets/archive-dropdown.php'); +require_once(get_template_directory() . '/widgets/comicblogpost.php'); // FUNCTIONS & Extra's diff --git a/style.css b/style.css index 375e80f..d794566 100644 --- a/style.css +++ b/style.css @@ -506,6 +506,7 @@ a.navi-comments:hover span { .post, .post-comic, .post-page { clear: both; + text-align: left; padding: 0 5px; } diff --git a/widgets/comicblogpost.php b/widgets/comicblogpost.php new file mode 100644 index 0000000..ef65d4f --- /dev/null +++ b/widgets/comicblogpost.php @@ -0,0 +1,54 @@ + 'widget_comicpress_comic_blog_post', 'description' => 'Displays the comic blog post, ..used to be around the comic areas.' ); + $this->WP_Widget('comic_blog_post', 'Comic Blog Post', $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; } + 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