/bp-templates/bp-legacy/buddypress/activity/index.php

  1. <?php 
  2. /** 
  3. * BuddyPress Activity templates 
  4. * 
  5. * @since 2.3.0 
  6. * 
  7. * @package BuddyPress 
  8. * @subpackage bp-legacy 
  9. */ 
  10.  
  11. /** 
  12. * Fires before the activity directory listing. 
  13. * 
  14. * @since 1.5.0 
  15. */ 
  16. do_action( 'bp_before_directory_activity' ); ?> 
  17.  
  18. <div id="buddypress"> 
  19.  
  20. <?php 
  21.  
  22. /** 
  23. * Fires before the activity directory display content. 
  24. * 
  25. * @since 1.2.0 
  26. */ 
  27. do_action( 'bp_before_directory_activity_content' ); ?> 
  28.  
  29. <?php if ( is_user_logged_in() ) : ?> 
  30.  
  31. <?php bp_get_template_part( 'activity/post-form' ); ?> 
  32.  
  33. <?php endif; ?> 
  34.  
  35. <div id="template-notices" role="alert" aria-atomic="true"> 
  36. <?php 
  37.  
  38. /** 
  39. * Fires towards the top of template pages for notice display. 
  40. * 
  41. * @since 1.0.0 
  42. */ 
  43. do_action( 'template_notices' ); ?> 
  44.  
  45. </div> 
  46.  
  47. <div class="item-list-tabs activity-type-tabs" aria-label="<?php esc_attr_e( 'Sitewide activities navigation', 'buddypress' ); ?>" role="navigation"> 
  48. <ul> 
  49. <?php 
  50.  
  51. /** 
  52. * Fires before the listing of activity type tabs. 
  53. * 
  54. * @since 1.2.0 
  55. */ 
  56. do_action( 'bp_before_activity_type_tab_all' ); ?> 
  57.  
  58. <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_get_total_member_count() . '</span>' ); ?></a></li> 
  59.  
  60. <?php if ( is_user_logged_in() ) : ?> 
  61.  
  62. <?php 
  63.  
  64. /** 
  65. * Fires before the listing of friends activity type tab. 
  66. * 
  67. * @since 1.2.0 
  68. */ 
  69. do_action( 'bp_before_activity_type_tab_friends' ); ?> 
  70.  
  71. <?php if ( bp_is_active( 'friends' ) ) : ?> 
  72.  
  73. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> 
  74.  
  75. <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li> 
  76.  
  77. <?php endif; ?> 
  78.  
  79. <?php endif; ?> 
  80.  
  81. <?php 
  82.  
  83. /** 
  84. * Fires before the listing of groups activity type tab. 
  85. * 
  86. * @since 1.2.0 
  87. */ 
  88. do_action( 'bp_before_activity_type_tab_groups' ); ?> 
  89.  
  90. <?php if ( bp_is_active( 'groups' ) ) : ?> 
  91.  
  92. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  93.  
  94. <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>"><?php printf( __( 'My Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>' ); ?></a></li> 
  95.  
  96. <?php endif; ?> 
  97.  
  98. <?php endif; ?> 
  99.  
  100. <?php 
  101.  
  102. /** 
  103. * Fires before the listing of favorites activity type tab. 
  104. * 
  105. * @since 1.2.0 
  106. */ 
  107. do_action( 'bp_before_activity_type_tab_favorites' ); ?> 
  108.  
  109. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?> 
  110.  
  111. <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>"><?php printf( __( 'My Favorites %s', 'buddypress' ), '<span>' . bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) . '</span>' ); ?></a></li> 
  112.  
  113. <?php endif; ?> 
  114.  
  115. <?php if ( bp_activity_do_mentions() ) : ?> 
  116.  
  117. <?php 
  118.  
  119. /** 
  120. * Fires before the listing of mentions activity type tab. 
  121. * 
  122. * @since 1.2.0 
  123. */ 
  124. do_action( 'bp_before_activity_type_tab_mentions' ); ?> 
  125.  
  126. <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li> 
  127.  
  128. <?php endif; ?> 
  129.  
  130. <?php endif; ?> 
  131.  
  132. <?php 
  133.  
  134. /** 
  135. * Fires after the listing of activity type tabs. 
  136. * 
  137. * @since 1.2.0 
  138. */ 
  139. do_action( 'bp_activity_type_tabs' ); ?> 
  140. </ul> 
  141. </div><!-- .item-list-tabs --> 
  142.  
  143. <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Activity secondary navigation', 'buddypress' ); ?>" role="navigation"> 
  144. <ul> 
  145. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li> 
  146.  
  147. <?php 
  148.  
  149. /** 
  150. * Fires before the display of the activity syndication options. 
  151. * 
  152. * @since 1.2.0 
  153. */ 
  154. do_action( 'bp_activity_syndication_options' ); ?> 
  155.  
  156. <li id="activity-filter-select" class="last"> 
  157. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label> 
  158. <select id="activity-filter-by"> 
  159. <option value="-1"><?php _e( '— Everything —', 'buddypress' ); ?></option> 
  160.  
  161. <?php bp_activity_show_filters(); ?> 
  162.  
  163. <?php 
  164.  
  165. /** 
  166. * Fires inside the select input for activity filter by options. 
  167. * 
  168. * @since 1.2.0 
  169. */ 
  170. do_action( 'bp_activity_filter_options' ); ?> 
  171.  
  172. </select> 
  173. </li> 
  174. </ul> 
  175. </div><!-- .item-list-tabs --> 
  176.  
  177. <?php 
  178.  
  179. /** 
  180. * Fires before the display of the activity list. 
  181. * 
  182. * @since 1.5.0 
  183. */ 
  184. do_action( 'bp_before_directory_activity_list' ); ?> 
  185.  
  186. <div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all"> 
  187.  
  188. <?php bp_get_template_part( 'activity/activity-loop' ); ?> 
  189.  
  190. </div><!-- .activity --> 
  191.  
  192. <?php 
  193.  
  194. /** 
  195. * Fires after the display of the activity list. 
  196. * 
  197. * @since 1.5.0 
  198. */ 
  199. do_action( 'bp_after_directory_activity_list' ); ?> 
  200.  
  201. <?php 
  202.  
  203. /** 
  204. * Fires inside and displays the activity directory display content. 
  205. */ 
  206. do_action( 'bp_directory_activity_content' ); ?> 
  207.  
  208. <?php 
  209.  
  210. /** 
  211. * Fires after the activity directory display content. 
  212. * 
  213. * @since 1.2.0 
  214. */ 
  215. do_action( 'bp_after_directory_activity_content' ); ?> 
  216.  
  217. <?php 
  218.  
  219. /** 
  220. * Fires after the activity directory listing. 
  221. * 
  222. * @since 1.5.0 
  223. */ 
  224. do_action( 'bp_after_directory_activity' ); ?> 
  225.  
  226. </div> 
.