* @uses bbp_view_title() To output the view title
*/
function widget( $args, $instance ) {
// Only output widget contents if views exist
if ( bbp_get_views() ) :
extract( $args );
$title = apply_filters( 'bbp_view_widget_title', $instance['title'] );
echo $before_widget;
echo $before_title . $title . $after_title; ?>
<ul>
<?php foreach ( bbp_get_views() as $view => $args ) : ?>
<li><a class="bbp-view-title" href="<?php bbp_view_url( $view ); ?>" title="<?php bbp_view_title( $view ); ?>"><?php bbp_view_title( $view ); ?></a></li>