Skip to content

Commit

Permalink
adjustment/fixes to the widgets/comments.php
Browse files Browse the repository at this point in the history
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
  • Loading branch information
Philip M. Hofer (Frumph) committed Feb 12, 2011
1 parent fc9567d commit b2330fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.txt
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion widgets/comments.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit b2330fe

Please sign in to comment.