'post_list_widget comment_widget', 'description' => esc_html__('Displays recent comments.', 'nanopress') ); parent::__construct( 'nanopress_recent_comments_widget', esc_html__('jellywp: Recent Comments', 'nanopress'), $widget_ops); } /*-----------------------------------------------------------------------------------*/ /* Display Widget /*-----------------------------------------------------------------------------------*/ function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); print $before_widget; if ( $title ) print $before_title . esc_attr($title) . $after_title; ?>
"; } /*-----------------------------------------------------------------------------------*/ /* Widget Settings (Displays the widget settings controls on the widget panel) /*-----------------------------------------------------------------------------------*/ function form( $instance ) { $defaults = array('title' => 'Recent Comments', 'entries_display' => 5); $instance = wp_parse_args((array) $instance, $defaults); ?>