function widget($args, $instance) { extract($args); $title = apply_filters('widget_name', $instance['title']); $limit = $instance['limit']; $outer = $instance['outer']; $outpost = $instance['outpost']; echo $before_widget; echo $before_title . $title . $after_title; echo '<ul>'; echo mod_newcomments($limit, $outpost, $outer); echo '</ul>'; echo $after_widget; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_name', $instance['title']); $limit = $instance['limit']; $outer = $instance['outer']; $outpost = $instance['outpost']; $more = $instance['more']; $link = $instance['link']; $mo = ''; if ($more != '' && $link != '') { $mo = '<a class="btn" href="' . $link . '">' . $more . '</a>'; } echo $before_widget; echo $before_title . $mo . $title . $after_title; echo '<ul>'; echo mod_newcomments($limit, $outpost, $outer); echo '</ul>'; echo $after_widget; }
function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? '最新评论' : apply_filters('widget_title', $instance['title']); $count = empty($instance['count']) ? '5' : apply_filters('widget_count', $instance['count']); echo $before_title . $title . $after_title; echo '<ul class="newcomments">'; echo mod_newcomments($count); echo '</ul>'; echo $after_widget; }