bp_get_members_pagination_count ()

生成成员分页计数。

描述

返回

(字符串)

文件:bp-members / bp-members-template.php

函数bp_get_members_pagination_count() {global $members_template;If (empty($members_template->type)) $members_template->type = ";$start_num = intval(($members_template->pag_page - 1) * $members_template->pag_num) + 1;$from_num = bp_core_number_format($start_num);$to_num = bp_core_number_format(($start_num + ($members_template->pag_num - 1) > $members_template->total_member_count) ?$members_template->total_member_count: $start_num + ($members_template->pag_num - 1));$total = bp_core_number_format($members_template->total_member_count);if ('active' == $members_template->type) {$pag = sprintf(_n('查看1个成员','查看%1$s - %2$s of %3$s members', $members_template->total_member_count, 'buddyboss'), $from_num, $to_num, $total);} elseif ('popular' == $members_template->type) {$pag = sprintf(_n('查看1个成员的连接','查看%1$s - %2$s的%3$s成员的连接',$members_template->total_member_count, 'buddyboss'), $from_num, $to_num, $total);} elseif ('online' == $members_template->type) {$pag = sprintf(_n('查看1个在线成员','查看%1$s - %2$s of %3$s在线成员',$members_template->total_member_count, 'buddyboss'), $from_num, $to_num, $total); } else { $pag = sprintf( _n( 'Viewing 1 member', 'Viewing %1$s - %2$s of %3$s members', $members_template->total_member_count, 'buddyboss' ), $from_num, $to_num, $total ); } /** * Filters the members pagination count. * * @since BuddyPress 1.5.0 * * @param string $pag Pagination count string. */ return apply_filters( 'bp_members_pagination_count', $pag ); }

更新日志

更新日志
版本 描述
BuddyPress 1.5.0 介绍了。

问题吗?

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