<?php /** * Topics Loop - Single * * @package bbPress * @subpackage Theme */ ?> <ul id="bbp-topic-<?php bbp_topic_id(); ?> " <?php bbp_topic_class(); ?> > <li class="bbp-topic-title"> <?php if (bbp_is_user_home()) { ?> <?php if (bbp_is_favorites()) { ?> <span class="bbp-topic-action"> <?php
?> <br class="clear" /> <?php bbp_get_template_part('topic-info', 'top'); ?> <div class="topic-body"> <div id="bbp-topic-<?php bbp_topic_id(); ?> " <?php bbp_topic_class('bbp-lead-topic'); ?> > <div class="bbp-topic-content"> <?php do_action('bbp_theme_before_topic_content'); ?> <?php bbp_topic_content(); ?> <?php do_action('bbp_theme_after_topic_content');
<?php /** * Topics Loop - Single * * @package bbPress * @subpackage Theme */ ?> <ul id="topic-<?php bbp_topic_id(); ?> " <?php bbp_topic_class(bbp_get_topic_id(), array('row')); ?> > <li class="bbp-topic-title col-lg-8"> <?php if (bbp_is_user_home()) { ?> <?php if (bbp_is_favorites()) { ?> <span class="bbp-topic-action"> <?php
public function single_row($level = 0) { global $mode, $post; static $alternate; $edit_link = '#'; get_edit_post_link($post->ID); $title = get_the_title(); $post_type_object = get_post_type_object($post->post_type); $can_edit_post = false; // current_user_can( 'edit_post', $post->ID ); $alternate = 'alternate' == $alternate ? '' : 'alternate'; $classes = array($alternate, 'level-0'); ?> <tr id="topic-row-<?php echo $post->ID; ?> " <?php bbp_topic_class($post->ID, $classes); ?> > <?php $forum_id = bbp_get_topic_forum_id($post->ID); $topic_id = $post->ID; list($columns, $hidden) = $this->get_column_info(); foreach ($columns as $column_name => $column_display_name) { $class = "class=\"column-{$column_name}\""; $style = ''; if (in_array($column_name, $hidden)) { $style = ' style="display:none;"'; } $attributes = "{$class}{$style}"; switch ($column_name) { case 'no': ?> <td <?php echo $attributes; ?> > <?php bbp_the_no(); ?> </td> <?php break; case 'title': $pad = str_repeat('— ', $level); $title = '<a class="bbp-topic-permalink row-title" href="' . bbp_get_topic_permalink() . '">' . $title . '</a>'; echo "<td {$attributes}>"; do_action('bbp_theme_before_topic_title'); echo $pad . $title; do_action('bbp_theme_after_topic_title'); echo '</td>'; break; // Forum // Forum case 'forum': // Output forum name if (!empty($forum_id)) { // Forum Title $forum_title = bbp_get_forum_title($forum_id); if (empty($forum_title)) { $forum_title = esc_html__('No Forum', 'bbpress'); } // Output the title echo $forum_title; } else { esc_html_e('(No Forum)', 'bbpress'); } break; // Reply Count // Reply Count case 'reply_count': echo "<td {$attributes}>"; echo '<div class="post-com-count-wrapper"><a class="post-com-count" href="#"><span class="comment-count">'; bbp_topic_reply_count($topic_id); echo '</span></a></div>'; echo "</td>"; break; // Reply Count // Reply Count case 'voice_count': echo "<td {$attributes}>"; bbp_topic_voice_count($topic_id); break; // Author // Author case 'author': echo "<td {$attributes}>"; bbp_topic_author_display_name($topic_id); echo "</td>"; break; // Freshness // Freshness case 'date': echo "<td {$attributes}>"; echo get_the_date('Y.m.d'); echo "</td>"; break; // Freshness // Freshness case 'freshness': echo "<td {$attributes}>"; $last_active = bbp_get_topic_last_active_time($topic_id, false); if (!empty($last_active)) { echo esc_html($last_active); } else { esc_html_e('No Replies', 'bbpress'); // This should never happen } echo "</td>"; break; default: ?> <td <?php echo $attributes; ?> ><?php do_action("bbpkr_{$post->post_type}_list_custom_column", $column_name, $post->ID); ?> </td> <?php break; } } ?> </tr> <?php }
?> <a href="<?php bbp_topic_permalink(); ?> "><?php bbp_topic_title(); ?> </a></h3> </span> </div><!-- .bbp-reply-title --> </div> <div <?php bbp_topic_class(0, 'single-post'); ?> > <div class="bbp-reply-author"> <?php do_action('bbp_theme_before_reply_author_details'); ?> <?php bbp_topic_author_link(array('sep' => '<br />', 'show_role' => true, 'type' => 'avatar')); ?> <?php if (bbp_is_user_keymaster()) {