'widget__comment', 'description' => 'Display the last comments.' ); parent::__construct('azurelo_comment_widget', 'Azurelo: Last comments', $widget_ops); } function form($instance) { $default = array( 'title' => 'Last comments', 'nb_comment' => '4', 'is_slider' => 'off'); $instance = wp_parse_args( (array) $instance, $default ); ?>

$nb_comment ); $comments_query = new WP_Comment_Query(); $comments = $comments_query->query( $args ); if ( $comments ) { if ($is_slider && $nb_comment > 1) { echo '
'; } foreach ( $comments as $comment ) { ?>
user_id, '50' ); ?>
comment_author ); ?> on comment_post_ID; ?>
comment_content, 20); ?>
comment_date)) ); ?>
1) { echo '
'; } } else { ?>