* @uses bbp_forums() To check whether there are more forums available
* in the loop
* @uses bbp_the_forum() Loads up the current forum in the loop
* @uses bbp_forum_permalink() To display the forum permalink
* @uses bbp_forum_title() To display the forum title
*/
function widget( $args, $instance ) {
extract( $args );
$title = apply_filters( 'bbp_forum_widget_title', $instance['title'] );
$parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : '0';
$forums_query = array(
'post_parent' => $parent_forum,
'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
'orderby' => 'menu_order',
'order' => 'ASC'
);
bbp_set_query_name( 'bbp_widget' );