hesabixWpTheme/bbpress/content-single-topic-lead.php

77 lines
2.8 KiB
PHP

<?php
/**
* موضوع اصلی (lead) — عناوین فارسی
*
* @package Hesabix2
* @subpackage bbPress
*/
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_lead_topic' ); ?>
<ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
<li class="bbp-header">
<div class="bbp-topic-author"><?php esc_html_e( 'نویسنده', 'hesabix2' ); ?></div>
<div class="bbp-topic-content"><?php esc_html_e( 'موضوع', 'hesabix2' ); ?></div>
</li>
<li class="bbp-body">
<?php
$hesabix2_topic_origin = function_exists( 'hesabix2_bbpress_messenger_origin' )
? hesabix2_bbpress_messenger_origin( (int) bbp_get_topic_id() )
: ( in_array( get_post_meta( (int) bbp_get_topic_id(), '_hesabix_bale_sync_origin', true ), array( 'bale', 'telegram' ), true )
? get_post_meta( (int) bbp_get_topic_id(), '_hesabix_bale_sync_origin', true )
: false );
$hesabix2_topic_classes = '';
if ( $hesabix2_topic_origin ) {
$hesabix2_topic_classes = ' hesabix2-bbp-post--from-bale hesabix2-bbp-post--from-messenger hesabix2-bbp-post--from-' . sanitize_html_class( $hesabix2_topic_origin );
}
?>
<div class="hesabix2-bbp-post<?php echo esc_attr( $hesabix2_topic_classes ); ?>" id="hesabix2-bbp-post-<?php bbp_topic_id(); ?>-lead">
<div class="bbp-topic-header">
<div class="bbp-meta">
<span class="bbp-topic-post-date"><?php bbp_topic_post_date(); ?></span>
<a href="<?php bbp_topic_permalink(); ?>" class="bbp-topic-permalink">#<?php bbp_topic_id(); ?></a>
<?php do_action( 'bbp_theme_before_topic_admin_links' ); ?>
<?php bbp_topic_admin_links(); ?>
<?php do_action( 'bbp_theme_after_topic_admin_links' ); ?>
</div>
</div>
<div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
<div class="bbp-topic-author">
<?php do_action( 'bbp_theme_before_topic_author_details' ); ?>
<?php bbp_topic_author_link( array( 'show_role' => true ) ); ?>
<?php if ( current_user_can( 'moderate', bbp_get_topic_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
<div class="bbp-topic-ip"><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>
<?php do_action( 'bbp_theme_after_topic_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_topic_author_details' ); ?>
</div>
<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' ); ?>
</div>
</div>
</div>
</li>
<li class="bbp-footer">
<div class="bbp-topic-author"><?php esc_html_e( 'نویسنده', 'hesabix2' ); ?></div>
<div class="bbp-topic-content"><?php esc_html_e( 'موضوع', 'hesabix2' ); ?></div>
</li>
</ul>
<?php do_action( 'bbp_template_after_lead_topic' );