115 lines
3.1 KiB
PHP
Executable File
115 lines
3.1 KiB
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* Topics Loop - Single
|
|
*
|
|
* @package bbPress
|
|
* @subpackage Theme
|
|
*/
|
|
|
|
/* Edited
|
|
Edit: "Move topic meta beside title."
|
|
*/
|
|
|
|
|
|
// Exit if accessed directly
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
?>
|
|
|
|
<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-row-actions">
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
|
|
|
|
<?php bbp_topic_favorite_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '×' ) ); ?>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
|
|
|
|
</span>
|
|
|
|
<?php elseif ( bbp_is_subscriptions() ) : ?>
|
|
|
|
<span class="bbp-row-actions">
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
|
|
|
|
<?php bbp_topic_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '×' ) ); ?>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
|
|
|
|
</span>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_title' ); ?>
|
|
|
|
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_title' ); ?>
|
|
|
|
<?php bbp_topic_pagination(); ?>
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_meta' ); ?>
|
|
|
|
<p class="bbp-topic-meta entry-meta">
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
|
|
|
|
<span class="bbp-topic-started-by"><?php printf( esc_html__( 'Started by: %1$s', 'kadence' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
|
|
|
|
<?php if ( ! bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
|
|
|
|
<span class="bbp-topic-started-in"><?php printf( esc_html__( 'in: %1$s', 'kadence' ), '<a href="' . bbp_get_forum_permalink( bbp_get_topic_forum_id() ) . '">' . bbp_get_forum_title( bbp_get_topic_forum_id() ) . '</a>' ); ?></span>
|
|
<?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
|
|
|
|
<?php endif; ?>
|
|
<span class="bbpress-meta-replies">
|
|
<?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?>
|
|
<?php
|
|
bbp_show_lead_topic()
|
|
? esc_html_e( 'Replies', 'kadence' )
|
|
: esc_html_e( 'Posts', 'kadence' );
|
|
?>
|
|
</span>
|
|
</p>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_meta' ); ?>
|
|
|
|
<?php bbp_topic_row_actions(); ?>
|
|
|
|
</li>
|
|
|
|
<li class="bbp-topic-freshness">
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
|
|
|
|
<?php bbp_topic_freshness_link(); ?>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
|
|
|
|
<p class="bbp-topic-meta">
|
|
|
|
<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
|
|
|
|
<span class="bbp-topic-freshness-author">by <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
|
|
|
|
<?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
|
|
|
|
</p>
|
|
|
|
</li>
|
|
</ul><!-- #bbp-topic-<?php bbp_topic_id(); ?> -->
|