37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* صفحهبندی پاسخها — نسخه فشرده Hesabix2
|
|
*
|
|
* @package Hesabix2
|
|
* @subpackage bbPress
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
do_action( 'bbp_template_before_pagination_loop' );
|
|
|
|
$hesabix2_bbp_pager_count = function_exists( 'bbp_get_topic_pagination_count' ) ? bbp_get_topic_pagination_count() : '';
|
|
$hesabix2_bbp_pager_links = function_exists( 'bbp_get_topic_pagination_links' ) ? bbp_get_topic_pagination_links() : '';
|
|
|
|
if ( '' === $hesabix2_bbp_pager_count && empty( $hesabix2_bbp_pager_links ) ) {
|
|
do_action( 'bbp_template_after_pagination_loop' );
|
|
return;
|
|
}
|
|
|
|
$hesabix2_bbp_pager_class = 'bbp-pagination hesabix2-bbp-pagination--compact';
|
|
if ( empty( $hesabix2_bbp_pager_links ) ) {
|
|
$hesabix2_bbp_pager_class .= ' hesabix2-bbp-pagination--count-only';
|
|
}
|
|
?>
|
|
|
|
<div class="<?php echo esc_attr( $hesabix2_bbp_pager_class ); ?>">
|
|
<?php if ( $hesabix2_bbp_pager_count ) : ?>
|
|
<div class="bbp-pagination-count"><?php echo esc_html( $hesabix2_bbp_pager_count ); ?></div>
|
|
<?php endif; ?>
|
|
<?php if ( ! empty( $hesabix2_bbp_pager_links ) ) : ?>
|
|
<div class="bbp-pagination-links"><?php echo $hesabix2_bbp_pager_links; ?></div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php
|
|
do_action( 'bbp_template_after_pagination_loop' );
|