Guest User

Untitled

a guest
Feb 20th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.04 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Template Name: BuddyPress - Activity Directory
  5. *
  6. * @package BuddyPress
  7. * @subpackage Theme
  8. */
  9.  
  10. ?>
  11.  
  12. <?php get_header(); ?>
  13.  
  14. <?php do_action( 'bp_before_directory_activity_page' ); ?>
  15.  
  16. <div class="art-content-layout">
  17.  
  18. <?php do_action( 'bp_before_directory_activity' ); ?>
  19.  
  20. <?php if ( !is_user_logged_in() ) : ?>
  21.  
  22. <h3><?php _e( 'Site Activity', 'buddypress' ); ?></h3>
  23.  
  24. <?php endif; ?>
  25.  
  26. <?php do_action( 'bp_before_directory_activity_content' ); ?>
  27.  
  28. <?php if ( is_user_logged_in() ) : ?>
  29.  
  30. <?php locate_template( array( 'activity/post-form.php'), true ); ?>
  31.  
  32. <?php endif; ?>
  33.  
  34. <?php do_action( 'template_notices' ); ?>
  35.  
  36. <div class="item-list-tabs activity-type-tabs" role="navigation">
  37. <ul>
  38. <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
  39.  
  40. <li class="selected" id="activity-all"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/'; ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_site_member_count() ); ?></a></li>
  41.  
  42. <?php if ( is_user_logged_in() ) : ?>
  43.  
  44. <?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
  45.  
  46. <?php if ( bp_is_active( 'friends' ) ) : ?>
  47.  
  48. <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  49.  
  50. <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
  51.  
  52. <?php endif; ?>
  53.  
  54. <?php endif; ?>
  55.  
  56. <?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
  57.  
  58. <?php if ( bp_is_active( 'groups' ) ) : ?>
  59.  
  60. <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  61.  
  62. <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
  63.  
  64. <?php endif; ?>
  65.  
  66. <?php endif; ?>
  67.  
  68. <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
  69.  
  70. <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
  71.  
  72. <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
  73.  
  74. <?php endif; ?>
  75.  
  76. <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
  77.  
  78. <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
  79.  
  80. <?php endif; ?>
  81.  
  82. <?php do_action( 'bp_activity_type_tabs' ); ?>
  83. </ul>
  84. </div><!-- .item-list-tabs -->
  85.  
  86. <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
  87. <ul>
  88. <li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
  89.  
  90. <?php do_action( 'bp_activity_syndication_options' ); ?>
  91.  
  92. <li id="activity-filter-select" class="last">
  93. <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
  94. <select id="activity-filter-by">
  95. <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
  96. <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
  97.  
  98. <?php if ( bp_is_active( 'blogs' ) ) : ?>
  99.  
  100. <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
  101. <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
  102.  
  103. <?php endif; ?>
  104.  
  105. <?php if ( bp_is_active( 'forums' ) ) : ?>
  106.  
  107. <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
  108. <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
  109.  
  110. <?php endif; ?>
  111.  
  112. <?php if ( bp_is_active( 'groups' ) ) : ?>
  113.  
  114. <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
  115. <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
  116.  
  117. <?php endif; ?>
  118.  
  119. <?php if ( bp_is_active( 'friends' ) ) : ?>
  120.  
  121. <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
  122.  
  123. <?php endif; ?>
  124.  
  125. <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
  126.  
  127. <?php do_action( 'bp_activity_filter_options' ); ?>
  128.  
  129. </select>
  130. </li>
  131. </ul>
  132. </div><!-- .item-list-tabs -->
  133.  
  134. <?php do_action( 'bp_before_directory_activity_list' ); ?>
  135.  
  136. <div class="activity" role="main">
  137.  
  138. <?php locate_template( array( 'activity/activity-loop.php' ), true ); ?>
  139.  
  140. </div><!-- .activity -->
  141.  
  142. <?php do_action( 'bp_after_directory_activity_list' ); ?>
  143.  
  144. <?php do_action( 'bp_directory_activity_content' ); ?>
  145.  
  146. <?php do_action( 'bp_after_directory_activity_content' ); ?>
  147.  
  148. <?php do_action( 'bp_after_directory_activity' ); ?>
  149.  
  150. <?php get_sidebar('default'); ?>
  151. <?php get_sidebar('top'); ?>
  152. <?php get_sidebar('bottom'); ?>
  153. <?php get_sidebar('secondary'); ?>
  154. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment