当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_group_has_membership_requests函数代码示例

本文整理汇总了PHP中bp_group_has_membership_requests函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_group_has_membership_requests函数的具体用法?PHP bp_group_has_membership_requests怎么用?PHP bp_group_has_membership_requests使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_group_has_membership_requests函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do_action

<?php 
}
?>

<?php 
/* Manage Membership Requests */
if (bp_is_group_admin_screen('membership-requests')) {
    ?>

	<?php 
    do_action('bp_before_group_membership_requests_admin');
    ?>

	<?php 
    if (bp_group_has_membership_requests()) {
        ?>

		<ul id="request-list" class="item-list">
			<?php 
        while (bp_group_membership_requests()) {
            bp_group_the_membership_request();
            ?>

				<li>
					<?php 
            bp_group_request_user_avatar_thumb();
            ?>
					<h4><?php 
            bp_group_request_user_link();
            ?>
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:30,代码来源:admin.php

示例2: while

<?php

if (bp_group_has_membership_requests(bp_ajax_querystring('membership_requests'))) {
    ?>

	<div id="pag-top" class="pagination">

		<div class="pag-count" id="group-mem-requests-count-top">

			<?php 
    bp_group_requests_pagination_count();
    ?>

		</div>

		<div class="pagination-links" id="group-mem-requests-pag-top">

			<?php 
    bp_group_requests_pagination_links();
    ?>

		</div>

	</div>

	<ul id="request-list" class="item-list">
		<?php 
    while (bp_group_membership_requests()) {
        bp_group_the_membership_request();
        ?>
开发者ID:un1coin,项目名称:ovn-space,代码行数:30,代码来源:requests-loop.php

示例3: test_bp_group_has_membership_requests_format

 /**
  * Checks that the requests_template object is properly formatted
  *
  * @group bp_group_has_membership_requests
  * @group BP_Group_Membership_Requests_Template
  */
 public function test_bp_group_has_membership_requests_format()
 {
     $u1 = $this->factory->user->create(array('last_activity' => gmdate('Y-m-d H:i:s', time() - 60)));
     $g = $this->factory->group->create(array('creator_id' => $u1));
     $time = time();
     $user = $this->factory->user->create(array('last_activity' => gmdate('Y-m-d H:i:s', $time)));
     $membership = $this->add_user_to_group($user, $g, array('date_modified' => gmdate('Y-m-d H:i:s', $time), 'is_confirmed' => 0, 'inviter_id' => 0, 'invite_sent' => false));
     // Fake the current group
     global $groups_template;
     if (!isset($groups_template)) {
         $groups_template = new stdClass();
     }
     if (!isset($groups_template->group)) {
         $groups_template->group = new stdClass();
     }
     $groups_template->group->id = $g;
     // Populate the global
     bp_group_has_membership_requests(array('group_id' => $g, 'per_page' => 1, 'max' => 1));
     global $requests_template;
     $expected = new stdClass();
     $expected->id = $membership;
     $expected->group_id = $g;
     $expected->user_id = $user;
     $expected->inviter_id = '0';
     $expected->is_admin = '0';
     $expected->is_mod = '0';
     $expected->user_title = '';
     $expected->date_modified = gmdate('Y-m-d H:i:s', $time);
     $expected->comments = '';
     $expected->is_confirmed = '0';
     $expected->is_banned = '0';
     $expected->invite_sent = '0';
     // Check each expected value. If there are more in the results,
     // that's OK
     foreach (get_object_vars($expected) as $k => $v) {
         $this->assertEquals($v, $requests_template->requests[0]->{$k});
     }
 }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:44,代码来源:template.php


注:本文中的bp_group_has_membership_requests函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。