本文整理汇总了PHP中bp_groups_pagination_links函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_groups_pagination_links函数的具体用法?PHP bp_groups_pagination_links怎么用?PHP bp_groups_pagination_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_groups_pagination_links函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_action
</ul>
<?php do_action( 'bp_after_directory_groups_list' ); ?>
<div id="pag-bottom" class="pagination">
<div class="pag-count" id="group-dir-count-bottom">
<?php bp_groups_pagination_count(); ?>
</div>
<div class="pagination-links" id="group-dir-pag-bottom">
<?php bp_groups_pagination_links(); ?>
</div>
</div>
<?php else: ?>
<div id="message" class="info">
<p><?php _e( 'There were no groups found.', 'buddypress' ); ?></p>
</div>
<?php endif; ?>
<?php do_action( 'bp_after_groups_loop' ); ?>
示例2: bp_groups_pagination_count
?>
<div id="pag-bottom" class="pagination">
<div class="pag-count" id="group-dir-count-bottom">
<?php
bp_groups_pagination_count();
?>
</div>
<div class="pagination-links" id="group-dir-pag-bottom">
<?php
bp_groups_pagination_links();
?>
</div>
</div>
<?php
} else {
?>
<div id="message" class="info">
<p><?php
_e('There were no groups found.', 'buddypress');
?>
</p>
示例3: display
function display($page = 1)
{
global $bp, $groups_template;
$parent_template = $groups_template;
$hide_button = false;
if (isset($_REQUEST['grpage'])) {
$page = (int) $_REQUEST['grpage'];
} else {
if (!is_numeric($page)) {
$page = 1;
} else {
$page = (int) $page;
}
}
/** Respect BuddyPress group creation restriction */
if (function_exists('bp_user_can_create_groups')) {
$hide_button = !bp_user_can_create_groups();
}
bp_has_groups_hierarchy(array('type' => 'alphabetical', 'parent_id' => $bp->groups->current_group->id, 'page' => $page));
?>
<div class="group">
<?php
if (($bp->is_item_admin || $bp->groups->current_group->can_create_subitems) && !$hide_button) {
?>
<div class="generic-button group-button">
<a title="<?php
printf(__('Create a %s', 'bp-group-hierarchy'), __('Member Group', 'bp-group-hierarchy'));
?>
" href="<?php
echo $bp->root_domain . '/' . bp_get_groups_root_slug() . '/' . 'create' . '/?parent_id=' . $bp->groups->current_group->id;
?>
"><?php
printf(__('Create a %s', 'bp-group-hierarchy'), __('Member Group', 'bp-group-hierarchy'));
?>
</a>
</div><br /><br />
<?php
}
?>
<?php
if ($groups_template && count($groups_template->groups) > 0) {
?>
<div id="pag-top" class="pagination">
<div class="pag-count" id="group-dir-count-top">
<?php
bp_groups_pagination_count();
?>
</div>
<div class="pagination-links" id="group-dir-pag-top">
<?php
bp_groups_pagination_links();
?>
</div>
</div>
<ul id="groups-list" class="item-list">
<?php
while (bp_groups()) {
bp_the_group();
?>
<?php
$subgroup = $groups_template->group;
?>
<?php
if ($subgroup->status == 'hidden' && !(groups_is_user_member($bp->loggedin_user->id, $subgroup->id) || groups_is_user_admin($bp->loggedin_user->id, $bp->groups->current_group->id))) {
continue;
}
?>
<li id="tree-childof_<?php
bp_group_id();
?>
">
<div class="item-avatar">
<a href="<?php
bp_group_permalink();
?>
"><?php
bp_group_avatar('type=thumb&width=50&height=50');
?>
</a>
</div>
<div class="item">
<div class="item-title"><a href="<?php
bp_group_permalink();
?>
"><?php
bp_group_name();
?>
</a></div>
<div class="item-meta"><span class="activity"><?php
printf(__('active %s', 'buddypress'), bp_get_group_last_active());
?>
</span></div>
<div class="item-desc"><?php
bp_group_description_excerpt();
//.........这里部分代码省略.........