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

  1. <?php 
  2. /** 
  3. * BuddyPress - Members Single Message 
  4. * 
  5. * @package BuddyPress 
  6. * @subpackage bp-legacy 
  7. */ 
  8.  
  9. ?> 
  10. <div id="message-thread"> 
  11.  
  12. <?php 
  13.  
  14. /** 
  15. * Fires before the display of a single member message thread content. 
  16. * 
  17. * @since 1.1.0 
  18. */ 
  19. do_action( 'bp_before_message_thread_content' ); ?> 
  20.  
  21. <?php if ( bp_thread_has_messages() ) : ?> 
  22.  
  23. <h2 id="message-subject"><?php bp_the_thread_subject(); ?></h2> 
  24.  
  25. <p id="message-recipients"> 
  26. <span class="highlight"> 
  27.  
  28. <?php if ( bp_get_thread_recipients_count() <= 1 ) : ?> 
  29.  
  30. <?php _e( 'You are alone in this conversation.', 'buddypress' ); ?> 
  31.  
  32. <?php elseif ( bp_get_max_thread_recipients_to_list() <= bp_get_thread_recipients_count() ) : ?> 
  33.  
  34. <?php printf( __( 'Conversation between %s recipients.', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) ); ?> 
  35.  
  36. <?php else : ?> 
  37.  
  38. <?php printf( __( 'Conversation between %s and you.', 'buddypress' ), bp_get_thread_recipients_list() ); ?> 
  39.  
  40. <?php endif; ?> 
  41.  
  42. </span> 
  43.  
  44. <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>" title="<?php esc_attr_e( "Delete Conversation", 'buddypress' ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a> 
  45.  
  46. <?php 
  47.  
  48. /** 
  49. * Fires after the action links in the header of a single message thread. 
  50. * 
  51. * @since 2.5.0 
  52. */ 
  53. do_action( 'bp_after_message_thread_recipients' ); ?> 
  54. </p> 
  55.  
  56. <?php 
  57.  
  58. /** 
  59. * Fires before the display of the message thread list. 
  60. * 
  61. * @since 1.1.0 
  62. */ 
  63. do_action( 'bp_before_message_thread_list' ); ?> 
  64.  
  65. <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?> 
  66. <?php bp_get_template_part( 'members/single/messages/message' ); ?> 
  67. <?php endwhile; ?> 
  68.  
  69. <?php 
  70.  
  71. /** 
  72. * Fires after the display of the message thread list. 
  73. * 
  74. * @since 1.1.0 
  75. */ 
  76. do_action( 'bp_after_message_thread_list' ); ?> 
  77.  
  78. <?php 
  79.  
  80. /** 
  81. * Fires before the display of the message thread reply form. 
  82. * 
  83. * @since 1.1.0 
  84. */ 
  85. do_action( 'bp_before_message_thread_reply' ); ?> 
  86.  
  87. <form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form"> 
  88.  
  89. <div class="message-box"> 
  90.  
  91. <div class="message-metadata"> 
  92.  
  93. <?php 
  94.  
  95. /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 
  96. do_action( 'bp_before_message_meta' ); ?> 
  97.  
  98. <div class="avatar-box"> 
  99. <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?> 
  100.  
  101. <strong><?php _e( 'Send a Reply', 'buddypress' ); ?></strong> 
  102. </div> 
  103.  
  104. <?php 
  105.  
  106. /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */ 
  107. do_action( 'bp_after_message_meta' ); ?> 
  108.  
  109. </div><!-- .message-metadata --> 
  110.  
  111. <div class="message-content"> 
  112.  
  113. <?php 
  114.  
  115. /** 
  116. * Fires before the display of the message reply box. 
  117. * 
  118. * @since 1.1.0 
  119. */ 
  120. do_action( 'bp_before_message_reply_box' ); ?> 
  121.  
  122. <label for="message_content" class="bp-screen-reader-text"><?php 
  123. /** translators: accessibility text */ 
  124. _e( 'Reply to Message', 'buddypress' ); 
  125. ?></label> 
  126. <textarea name="content" id="message_content" rows="15" cols="40"></textarea> 
  127.  
  128. <?php 
  129.  
  130. /** 
  131. * Fires after the display of the message reply box. 
  132. * 
  133. * @since 1.1.0 
  134. */ 
  135. do_action( 'bp_after_message_reply_box' ); ?> 
  136.  
  137. <div class="submit"> 
  138. <input type="submit" name="send" value="<?php esc_attr_e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/> 
  139. </div> 
  140.  
  141. <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" /> 
  142. <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" /> 
  143. <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?> 
  144.  
  145. </div><!-- .message-content --> 
  146.  
  147. </div><!-- .message-box --> 
  148.  
  149. </form><!-- #send-reply --> 
  150.  
  151. <?php 
  152.  
  153. /** 
  154. * Fires after the display of the message thread reply form. 
  155. * 
  156. * @since 1.1.0 
  157. */ 
  158. do_action( 'bp_after_message_thread_reply' ); ?> 
  159.  
  160. <?php endif; ?> 
  161.  
  162. <?php 
  163.  
  164. /** 
  165. * Fires after the display of a single member message thread content. 
  166. * 
  167. * @since 1.1.0 
  168. */ 
  169. do_action( 'bp_after_message_thread_content' ); ?> 
  170.  
  171. </div> 
.