'widget_comments_wrap', 'description' => __( 'Popster - Recent Comments', 'popster') ); // Create the widget. parent::__construct('recent_comments_popster', __('Popster - Recent Comments', 'popster'), $widget_ops); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $default = array('widget_title'=>__('Latest Comments', 'popster'), 'quantity'=>'5' ); $instance = wp_parse_args($instance, $default); $widget_title = apply_filters('widget_title', $instance['widget_title']); $quantity = $instance['quantity']; // DISPLAY WIDGET echo $before_widget; ?>
$quantity, 'status' => 'approve' ) ); $size = 55; //print_r($recent_comments); foreach ( $recent_comments as $comment ){ $grav_url = "http://www.gravatar.com/avatar/" . md5( strtolower( trim( $comment->comment_author_email ) ) ) . "?s=" . $size; ?>

comment_author; ?>

comment_post_ID )); ?>

__('Latest Comments', 'popster'), 'quantity'=>'5' ); $instance = wp_parse_args($instance, $default); $widget_title = $instance['widget_title']; $quantity = $instance['quantity']; ?>

Widget title:

Posts: