bbp_get_forum_index_pagination_count ()

返回论坛索引分页计数

描述

返回

(字符串)论坛Pagintion计数

文件:bp-forums /论坛/ template.php

函数bbp_get_forum_index_pagination_count() {$bbp = bbpress();If (empty($bbp->forum_query))返回false;//设置分页值$start_num = intval(($bbp->forum_query-> pagage - 1) * $bbp->forum_query->posts_per_page) + 1;$from_num = bbp_number_format($start_num);($start_num + ($bbp->forum_query->posts_per_page - 1) > $bbp->forum_query->found_posts) ?$bbp->forum_query->found_posts: $start_num + ($bbp->forum_query->posts_per_page - 1));if ($bbp->forum_query->found_posts) = ($bbp->forum_query->found_posts) ?bbp - > forum_query - > found_posts: bbp - > forum_query - > post_count;$total = bbp_number_format($total_int);$retstr = sprintf(_n('正在查看%1$s论坛','正在查看%1$s论坛',$total_int, 'buddyboss'), $total); //在一个论坛索引中的几个论坛如果(空($to_num)) {$retstr = sprintf(_n('正在查看%1$s论坛',$total_int, 'buddyboss'), $total); // Several forums in a forum index with several pages } else { $retstr = sprintf( _n( 'Viewing %2$s of %4$s forums', 'Viewing %2$s - %3$s of %4$s forums', $total_int, 'buddyboss' ), $bbp->forum_query->post_count, $from_num, $to_num, $total ); } // Filter and return return apply_filters( 'bbp_get_forum_index_pagination_count', esc_html( $retstr ) ); }

更新日志

更新日志
版本 描述
bbPress (r2519) 介绍了。

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队