' . $link_before . apply_filters( 'the_title', $forum->post_title, $forum->ID ) . $link_after . '';
if ( !empty( $show_date ) ) {
$time = ( 'modified' == $show_date ) ? $forum->post_modified : $time = $forum->post_date;
$output .= " " . mysql2date( $date_format, $time );
}
}
/**
* @see Walker::end_el()
*
* @since bbPress (r2514)
*
* @param string $output Passed by reference. Used to append additional
* content.
* @param object $forum Page data object. Not used.
* @param int $depth Depth of page. Not Used.
*/
function end_el( &$output, $forum, $depth ) {
$output .= "
\n";
}
}
/**
* Create HTML dropdown list of bbPress forums/topics.
*
* @package bbPress
* @subpackage Classes
*
* @since bbPress (r2746)
* @uses Walker
*/
class BBP_Walker_Dropdown extends Walker {
/**
* @see Walker::$tree_type
*
* @since bbPress (r2746)
*
* @var string
*/
var $tree_type;
/**
* @see Walker::$db_fields
*
* @since bbPress (r2746)
*
* @var array
*/
var $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' );
/**
* Set the tree_type
*
* @since bbPress (r2746)
*/
function BBP_Walker_Dropdown() {
$this->tree_type = bbp_get_forum_post_type();
}
/**
* @see Walker::start_el()
*
* @since bbPress (r2746)
*
* @param string $output Passed by reference. Used to append additional
* content.
* @param object $post Post data object.
* @param int $depth Depth of post in reference to parent posts. Used
* for padding.
* @param array $args Uses 'selected' argument for selected post to set
* selected HTML attribute for option element.
* @uses bbp_is_forum_category() To check if the forum is a category
* @uses current_user_can() To check if the current user can post in
* closed forums
* @uses bbp_is_forum_closed() To check if the forum is closed
* @uses apply_filters() Calls 'bbp_walker_dropdown_post_title' with the
* title, output, post, depth and args
*/
function start_el( &$output, $post, $depth, $args ) {
$pad = str_repeat( ' ', $depth * 3 );
$output .= "\t\n";
}
}
endif; // class_exists check
?>