function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base); if (function_exists('wkc_recent_comments')) { echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo '<ul>', "\n"; $param = ''; $param .= 'number=' . $instance['number']; $param .= '&before=' . $instance['before']; $param .= '&after=' . $instance['after']; $param .= '&showpass='******'show_pass']; $param .= '&length=' . $instance['sublen']; $param .= '&skipuser='******'skipuser']; $param .= '&avatarsize=' . ($instance['avatarsize'] == '' ? 16 : $instance['avatarsize']); if ($instance['xformat'] == '') { $instance['xformat'] = '<a class="commentor" href="%comment_author_url%" >%comment_author%</a> : <a class="comment_content" href="%permalink%" title="View the entire comment by %comment_author%" >%comment_excerpt%</a>'; } $param .= '&xformat=' . $instance['xformat']; wkc_recent_comments($param); echo '</ul>', "\n", $after_widget; } }
function widget_wkc_recent_comments($args) { extract($args); $options = get_option('widget_wkc_recent_comments'); $title = htmlspecialchars(stripslashes($options['title'])); if (function_exists('wkc_recent_comments')) { echo $before_widget . $before_title . $title . $after_title; echo '<ul>' . "\n"; $param = ''; $param .= 'number=' . $options['number']; $param .= '&before=' . $options['before']; $param .= '&after=' . $options['after']; $param .= '&showpass='******'show_pass']; $param .= '&length=' . $options['sublen']; $param .= '&skipuser='******'skipuser']; $param .= '&avatarsize=' . ($options['avatarsize'] == '' ? 16 : $options['avatarsize']); if ($options['xformat'] == '') { $options['xformat'] = '<a class="commentor" href="%comment_author_url%" >%comment_author%</a> : <a class="comment_content" href="%permalink%" title="View the entire comment by %comment_author%" >%comment_excerpt%</a>'; } $param .= '&xformat=' . $options['xformat']; wkc_recent_comments($param); echo '</ul>' . "\n"; echo $after_widget; } }
function wkc_add_recent_comments_to_feed($content) { global $ct_wp_kit_cn; global $post; if (is_feed() && $ct_wp_kit_cn->options['add_recent_comments_to_feed']) { return $content . '<h3>' . $ct_wp_kit_cn->options['recent_comments_list_title'] . '</h3><ul>' . wkc_recent_comments('echo=0&skipuser=&postid=' . $post->ID) . '</ul>'; } else { return $content; } }