Skip to content
Browse files

adjustment/fixes to the widgets/comments.php

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information...
1 parent fc9567d commit b2330fe25354d370832a8990f8d28e0eda5d0a83 Philip M. Hofer (Frumph) committed Feb 11, 2011
Showing with 4 additions and 1 deletion.
  1. +2 −0 changelog.txt
  2. +2 −1 widgets/comments.php
View
2 changelog.txt
@@ -12,6 +12,8 @@ added new option to enable the -foot and -head elements instead of having them a
dont display the extra dash if the bloginfo description is empty
started creating a proper readme.txt file
added option to show first comic on the home page
+added s at the end of comments for multiple comics in the comments widget
+added setup_postdata in the comments widget to properly access data
2.9.2.29.1
$is_comic needed to be set in the archive.php before hand, was giving notice
View
3 widgets/comments.php
@@ -19,11 +19,12 @@ function comicpress_comments_widget($skip_widget_init = false) {
function widget($args, $instance) {
global $post;
+ setup_postdata($post);
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? __('Permalink','comicpress') : apply_filters('widget_title', $instance['title']); ?>
- <?php if ('open' == $post->comment_status) { ?><div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> Comment ', '<span class="comment-balloon">1</span> Comment ', '<span class="comment-balloon">%</span> Comment '); ?></div><?php } ?>
+ <?php if ('open' == $post->comment_status) { ?><div class="comment-link"><?php comments_popup_link('<span class="comment-balloon comment-balloon-empty"> </span> Comment ', '<span class="comment-balloon">1</span> Comment ', '<span class="comment-balloon">%</span> Comments '); ?></div><?php } ?>
<?php
echo $after_widget;
}

0 comments on commit b2330fe

Please sign in to comment.
Something went wrong with that request. Please try again.