49 lines
1.9 KiB
PHP
49 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* لیست پاسخها — طرح hesabix2
|
|
*
|
|
* @package Hesabix2
|
|
* @subpackage AnsPress
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
$count = ( '' !== get_query_var( 'answer_id' ) ? ap_get_answers_count() : ap_total_answers_found() );
|
|
?>
|
|
<apanswersw style="<?php echo ! ap_have_answers() ? 'display:none' : ''; ?>">
|
|
<div id="ap-answers-c" class="hesabix2-ap-answers">
|
|
<div class="ap-sorting-tab flex flex-wrap items-center justify-between gap-4 mb-6 pb-4 border-b border-slate-200">
|
|
<h3 class="ap-answers-label text-xl font-bold text-slate-800 flex items-center gap-2" ap="answers_count_t">
|
|
<span class="inline-flex items-center justify-center min-w-[2rem] h-8 px-2 rounded-lg bg-brand-500/10 text-brand-600 font-bold text-base">
|
|
<span itemprop="answerCount"><?php echo (int) $count; ?></span>
|
|
</span>
|
|
<?php echo esc_html( _n( 'پاسخ', 'پاسخ', $count, 'anspress-question-answer' ) ); ?>
|
|
</h3>
|
|
<?php ap_answers_tab( get_the_permalink() ); ?>
|
|
</div>
|
|
|
|
<?php if ( '' === get_query_var( 'answer_id' ) && ap_have_answers() ) : ?>
|
|
<div class="hesabix2-ap-pagination-wrap hesabix2-ap-answers-pagination mb-6" role="navigation" aria-label="<?php esc_attr_e( 'صفحهبندی پاسخها', 'anspress-question-answer' ); ?>">
|
|
<?php ap_answers_the_pagination(); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div id="answers">
|
|
<apanswers>
|
|
<?php if ( ap_have_answers() ) : ?>
|
|
<?php while ( ap_have_answers() ) : ap_the_answer(); ?>
|
|
<?php include ap_get_theme_location( 'answer.php' ); ?>
|
|
<?php endwhile; ?>
|
|
<?php endif; ?>
|
|
</apanswers>
|
|
</div>
|
|
|
|
<?php if ( ap_have_answers() ) : ?>
|
|
<div class="hesabix2-ap-pagination-wrap hesabix2-ap-answers-pagination mt-8 pt-6 border-t border-slate-200" role="navigation" aria-label="<?php esc_attr_e( 'صفحهبندی پاسخها', 'anspress-question-answer' ); ?>">
|
|
<?php ap_answers_the_pagination(); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</apanswersw>
|