Advertisement
rdusnr

Untitled

Oct 10th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  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. <h3 id="message-subject"><i class="icon-forward"></i> <?php bp_the_thread_subject(); ?></h3>
  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.', '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> &nbsp;
  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. <span class="send-reply"><?php _e( 'Send a Reply', 'buddypress' ); ?></span>
  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.  
  127. <textarea name="content" id="message_content" rows="15" cols="40"></textarea>
  128.  
  129. <?php
  130.  
  131. /**
  132. * Fires after the display of the message reply box.
  133. *
  134. * @since 1.1.0
  135. */
  136. do_action( 'bp_after_message_reply_box' ); ?>
  137.  
  138. <div class="submit">
  139. <input type="submit" name="send" value="<?php esc_attr_e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/>
  140. </div>
  141.  
  142. <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
  143. <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
  144. <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
  145.  
  146. </div><!-- .message-content -->
  147.  
  148. </div><!-- .message-box -->
  149.  
  150. </form><!-- #send-reply -->
  151.  
  152. <?php
  153.  
  154. /**
  155. * Fires after the display of the message thread reply form.
  156. *
  157. * @since 1.1.0
  158. */
  159. do_action( 'bp_after_message_thread_reply' ); ?>
  160.  
  161. <?php endif; ?>
  162.  
  163. <?php
  164.  
  165. /**
  166. * Fires after the display of a single member message thread content.
  167. *
  168. * @since 1.1.0
  169. */
  170. do_action( 'bp_after_message_thread_content' ); ?>
  171.  
  172. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement