Protect() and Restore() the the LatestComicsWidget.inc to the rescue.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-25 12:08:37 -08:00
parent a73d8fdc8a
commit 15ec1d1c08
2 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,7 @@ if (!$comicpress_options['disable_lrsidebars_frontpage']) { ?>
the_widget('ComicPressCalendarWidget'); the_widget('ComicPressCalendarWidget');
the_widget('ComicPressArchiveDropdownWidget','mode=monthly_archive'); the_widget('ComicPressArchiveDropdownWidget','mode=monthly_archive');
} }
// the_widget('ComicPressLatestComicsWidget'); the_widget('ComicPressLatestComicsWidget');
endif; endif;
?> ?>
</div> </div>

View File

@ -20,7 +20,7 @@ class ComicPressLatestComicsWidget extends WP_Widget {
function widget($args, $instance) { function widget($args, $instance) {
global $post; global $post;
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
Protect();
echo $before_widget; echo $before_widget;
$title = empty($instance['title']) ? __('Latest Comics','comicpress') : apply_filters('widget_title', $instance['title']); $title = empty($instance['title']) ? __('Latest Comics','comicpress') : apply_filters('widget_title', $instance['title']);
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
@ -30,7 +30,10 @@ class ComicPressLatestComicsWidget extends WP_Widget {
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php echo $after_widget; <?php
Restore();
UnProtect();
echo $after_widget;
} }
function update($new_instance, $old_instance) { function update($new_instance, $old_instance) {