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


PHP bp_activity_has_more_items函数代码示例

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


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

示例1: get_activity

 /**
  * get_activity function.
  * 
  * @access public
  * @param mixed $filter
  * @return void
  */
 public function get_activity($filter)
 {
     $args = $filter;
     if (bp_has_activities($args)) {
         while (bp_activities()) {
             bp_the_activity();
             $activity = array('avatar' => bp_core_fetch_avatar(array('html' => false, 'item_id' => bp_get_activity_id())), 'action' => bp_get_activity_action(), 'content' => bp_get_activity_content_body(), 'activity_id' => bp_get_activity_id(), 'activity_username' => bp_core_get_username(bp_get_activity_user_id()), 'user_id' => bp_get_activity_user_id(), 'comment_count' => bp_activity_get_comment_count(), 'can_comment' => bp_activity_can_comment(), 'can_favorite' => bp_activity_can_favorite(), 'is_favorite' => bp_get_activity_is_favorite(), 'can_delete' => bp_activity_user_can_delete());
             $activity = apply_filters('bp_json_prepare_activity', $activity);
             $activities[] = $activity;
         }
         $data = array('activity' => $activities, 'has_more_items' => bp_activity_has_more_items());
         $data = apply_filters('bp_json_prepare_activities', $data);
     } else {
         return new WP_Error('bp_json_activity', __('No Activity Found.', 'buddypress'), array('status' => 200));
     }
     $response = new WP_REST_Response();
     $response->set_data($data);
     $response = rest_ensure_response($response);
     return $response;
 }
开发者ID:Ritesh-patel,项目名称:BP-API,代码行数:27,代码来源:bp-api-activity.php

示例2: while

	<?php 
    while (bp_activities()) {
        bp_the_activity();
        ?>

		<?php 
        locate_template(array('activity/entry.php'), true, false);
        ?>

	<?php 
    }
    ?>

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

		<li class="load-more">
			<a href="#more"><?php 
        _e('Load More', 'buddypress');
        ?>
</a>
		</li>

	<?php 
    }
    ?>

	<?php 
    if (empty($_POST['page'])) {
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:30,代码来源:activity-loop.php

示例3: test_bp_activity_has_more_items_count_total_true

 /**
  * @group bp_activity_has_more_items
  */
 public function test_bp_activity_has_more_items_count_total_true()
 {
     $a1 = $this->factory->activity->create();
     $a2 = $this->factory->activity->create();
     $a3 = $this->factory->activity->create();
     $a4 = $this->factory->activity->create();
     $args = array('count_total' => 'count_query', 'per_page' => 2);
     if (bp_has_activities($args)) {
         global $activities_template;
         $this->assertTrue(bp_activity_has_more_items());
         $activities_template = null;
     }
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:16,代码来源:template.php

示例4: widget


//.........这里部分代码省略.........
        }
        ?>

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

					<!-- loop -->

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

						<?php 
        //echo $query_string;
        ?>


						<?php 
        if (bp_has_activities(bp_ajax_querystring('activity') . $query_string)) {
            ?>

							<ul id="activity-stream" class="activity-list item-list">

								<?php 
            while (bp_activities()) {
                bp_the_activity();
                ?>

									<?php 
                bp_get_template_part('activity/entry');
                ?>

								<?php 
            }
            ?>

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

									<li class="load-more">
										<a href="<?php 
                bp_activity_load_more_link();
                ?>
"><?php 
                _e('Load More', 'buddypress');
                ?>
</a>
									</li>

								<?php 
            }
            ?>

							</ul>

						<?php 
        } else {
            ?>

							<div id="message" class="info">
								<p><?php 
            _e('Sorry, there was no activity found. Please try a different filter.', 'buddypress');
            ?>
</p>
							</div>

						<?php 
        }
        ?>
		

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

					<!-- endloop -->

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

					<?php 
        do_action('bp_after_directory_activity_content');
        ?>
				</div>

			</div>	
		
			<?php 
        do_action('bp_after_directory_activity');
        ?>

		<?php 
        /*  aqui termina a parte do buddypress  */
        print $after_body;
        print $after_widget;
    }
开发者ID:CoordCulturaDigital-Minc,项目名称:cdigital2014,代码行数:101,代码来源:widget-atividades.php

示例5: while

	<?php 
    while (humcore_deposits()) {
        humcore_the_deposit();
        ?>

		<?php 
        locate_template(array('deposits/entry.php'), true, false);
        ?>

	<?php 
    }
    ?>

	<?php 
    if (1 == 2 && bp_activity_has_more_items()) {
        ?>

		<li class="load-more">
			<a href="#more"><?php 
        _e('Load More', 'humcore_domain');
        ?>
</a>
		</li>

	<?php 
    }
    ?>

	<?php 
    if (1 == 1 || empty($_POST['page'])) {
开发者ID:MartinPaulEve,项目名称:humcore,代码行数:30,代码来源:group-deposits-loop.php


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