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

  1. <?php 
  2. /** 
  3. * BuddyPress - Users Messages 
  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.  
  14. <?php bp_get_options_nav(); ?> 
  15.  
  16. </ul> 
  17.  
  18. <?php if ( bp_is_messages_inbox() || bp_is_messages_sentbox() ) : ?> 
  19.  
  20. <div class="message-search"><?php bp_message_search_form(); ?></div> 
  21.  
  22. <?php endif; ?> 
  23.  
  24. </div><!-- .item-list-tabs --> 
  25.  
  26. <?php 
  27. switch ( bp_current_action() ) : 
  28.  
  29. // Inbox/Sentbox 
  30. case 'inbox' : 
  31. case 'sentbox' : 
  32.  
  33. /** 
  34. * Fires before the member messages content for inbox and sentbox. 
  35. * 
  36. * @since 1.2.0 
  37. */ 
  38. do_action( 'bp_before_member_messages_content' ); ?> 
  39.  
  40. <?php if ( bp_is_messages_inbox() ) : ?> 
  41. <h2 class="bp-screen-reader-text"><?php 
  42. /** translators: accessibility text */ 
  43. _e( 'Messages inbox', 'buddypress' ); 
  44. ?></h2> 
  45. <?php elseif ( bp_is_messages_sentbox() ) : ?> 
  46. <h2 class="bp-screen-reader-text"><?php 
  47. /** translators: accessibility text */ 
  48. _e( 'Sent Messages', 'buddypress' ); 
  49. ?></h2> 
  50. <?php endif; ?> 
  51.  
  52. <div class="messages"> 
  53. <?php bp_get_template_part( 'members/single/messages/messages-loop' ); ?> 
  54. </div><!-- .messages --> 
  55.  
  56. <?php 
  57.  
  58. /** 
  59. * Fires after the member messages content for inbox and sentbox. 
  60. * 
  61. * @since 1.2.0 
  62. */ 
  63. do_action( 'bp_after_member_messages_content' ); 
  64. break; 
  65.  
  66. // Single Message View 
  67. case 'view' : 
  68. bp_get_template_part( 'members/single/messages/single' ); 
  69. break; 
  70.  
  71. // Compose 
  72. case 'compose' : 
  73. bp_get_template_part( 'members/single/messages/compose' ); 
  74. break; 
  75.  
  76. // Sitewide Notices 
  77. case 'notices' : 
  78.  
  79. /** 
  80. * Fires before the member messages content for notices. 
  81. * 
  82. * @since 1.2.0 
  83. */ 
  84. do_action( 'bp_before_member_messages_content' ); ?> 
  85.  
  86. <h2 class="bp-screen-reader-text"><?php 
  87. /** translators: accessibility text */ 
  88. _e( 'Sitewide Notices', 'buddypress' ); 
  89. ?></h2> 
  90.  
  91. <div class="messages"> 
  92. <?php bp_get_template_part( 'members/single/messages/notices-loop' ); ?> 
  93. </div><!-- .messages --> 
  94.  
  95. <?php 
  96.  
  97. /** 
  98. * Fires after the member messages content for inbox and sentbox. 
  99. * 
  100. * @since 1.2.0 
  101. */ 
  102. do_action( 'bp_after_member_messages_content' ); 
  103. break; 
  104.  
  105. // Any other 
  106. default : 
  107. bp_get_template_part( 'members/single/plugins' ); 
  108. break; 
  109. endswitch; 
.