/bp-templates/bp-legacy/buddypress/members/single/friends.php

  1. <?php 
  2. /** 
  3. * BuddyPress - Users Friends 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. ?> 
  10.  
  11. <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Member secondary navigation', 'buddypress' ); ?>" role="navigation"> 
  12. <ul> 
  13. <?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?> 
  14.  
  15. <?php if ( !bp_is_current_action( 'requests' ) ) : ?> 
  16.  
  17. <li id="members-order-select" class="last filter"> 
  18.  
  19. <label for="members-friends"><?php _e( 'Order By:', 'buddypress' ); ?></label> 
  20. <select id="members-friends"> 
  21. <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 
  22. <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option> 
  23. <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option> 
  24.  
  25. <?php 
  26.  
  27. /** 
  28. * Fires inside the members friends order options select input. 
  29. * 
  30. * @since 2.0.0 
  31. */ 
  32. do_action( 'bp_member_friends_order_options' ); ?> 
  33.  
  34. </select> 
  35. </li> 
  36.  
  37. <?php endif; ?> 
  38.  
  39. </ul> 
  40. </div> 
  41.  
  42. <?php 
  43. switch ( bp_current_action() ) : 
  44.  
  45. // Home/My Friends 
  46. case 'my-friends' : 
  47.  
  48. /** 
  49. * Fires before the display of member friends content. 
  50. * 
  51. * @since 1.2.0 
  52. */ 
  53. do_action( 'bp_before_member_friends_content' ); ?> 
  54.  
  55. <?php if (is_user_logged_in() ) : ?> 
  56. <h2 class="bp-screen-reader-text"><?php 
  57. /** translators: accessibility text */ 
  58. _e( 'My friends', 'buddypress' ); 
  59. ?></h2> 
  60. <?php else : ?> 
  61. <h2 class="bp-screen-reader-text"><?php 
  62. /** translators: accessibility text */ 
  63. _e( 'Friends', 'buddypress' ); 
  64. ?></h2> 
  65. <?php endif ?> 
  66.  
  67. <div class="members friends"> 
  68.  
  69. <?php bp_get_template_part( 'members/members-loop' ) ?> 
  70.  
  71. </div><!-- .members.friends --> 
  72.  
  73. <?php 
  74.  
  75. /** 
  76. * Fires after the display of member friends content. 
  77. * 
  78. * @since 1.2.0 
  79. */ 
  80. do_action( 'bp_after_member_friends_content' ); 
  81. break; 
  82.  
  83. case 'requests' : 
  84. bp_get_template_part( 'members/single/friends/requests' ); 
  85. break; 
  86.  
  87. // Any other 
  88. default : 
  89. bp_get_template_part( 'members/single/plugins' ); 
  90. break; 
  91. endswitch; 
.