[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/members/single/messages/ -> single.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Members Single Message
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  ?>
  11  <div id="message-thread">
  12  
  13      <?php
  14  
  15      /**
  16       * Fires before the display of a single member message thread content.
  17       *
  18       * @since 1.1.0
  19       */
  20      do_action( 'bp_before_message_thread_content' ); ?>
  21  
  22      <?php if ( bp_thread_has_messages() ) : ?>
  23  
  24          <h2 id="message-subject"><?php bp_the_thread_subject(); ?></h2>
  25  
  26          <p id="message-recipients">
  27              <span class="highlight">
  28  
  29                  <?php if ( bp_get_thread_recipients_count() <= 1 ) : ?>
  30  
  31                      <?php _e( 'You are alone in this conversation.', 'buddypress' ); ?>
  32  
  33                  <?php elseif ( bp_get_max_thread_recipients_to_list() <= bp_get_thread_recipients_count() ) : ?>
  34  
  35                      <?php printf( __( 'Conversation between %s recipients.', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) ); ?>
  36  
  37                  <?php else : ?>
  38  
  39                      <?php printf( __( 'Conversation between %s.', 'buddypress' ), bp_get_thread_recipients_list() ); ?>
  40  
  41                  <?php endif; ?>
  42  
  43              </span>
  44  
  45              <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a>
  46  
  47              <?php
  48  
  49              /**
  50               * Fires after the action links in the header of a single message thread.
  51               *
  52               * @since 2.5.0
  53               */
  54              do_action( 'bp_after_message_thread_recipients' ); ?>
  55          </p>
  56  
  57          <?php
  58  
  59          /**
  60           * Fires before the display of the message thread list.
  61           *
  62           * @since 1.1.0
  63           */
  64          do_action( 'bp_before_message_thread_list' ); ?>
  65  
  66          <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
  67              <?php bp_get_template_part( 'members/single/messages/message' ); ?>
  68          <?php endwhile; ?>
  69  
  70          <?php
  71  
  72          /**
  73           * Fires after the display of the message thread list.
  74           *
  75           * @since 1.1.0
  76           */
  77          do_action( 'bp_after_message_thread_list' ); ?>
  78  
  79          <?php
  80  
  81          /**
  82           * Fires before the display of the message thread reply form.
  83           *
  84           * @since 1.1.0
  85           */
  86          do_action( 'bp_before_message_thread_reply' ); ?>
  87  
  88          <form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
  89  
  90              <div class="message-box">
  91  
  92                  <div class="message-metadata">
  93  
  94                      <?php
  95  
  96                      /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
  97                      do_action( 'bp_before_message_meta' ); ?>
  98  
  99                      <div class="avatar-box">
 100                          <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
 101  
 102                          <strong><?php _e( 'Send a Reply', 'buddypress' ); ?></strong>
 103                      </div>
 104  
 105                      <?php
 106  
 107                      /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
 108                      do_action( 'bp_after_message_meta' ); ?>
 109  
 110                  </div><!-- .message-metadata -->
 111  
 112                  <div class="message-content">
 113  
 114                      <?php
 115  
 116                      /**
 117                       * Fires before the display of the message reply box.
 118                       *
 119                       * @since 1.1.0
 120                       */
 121                      do_action( 'bp_before_message_reply_box' ); ?>
 122  
 123                      <label for="message_content" class="bp-screen-reader-text"><?php
 124                          /* translators: accessibility text */
 125                          _e( 'Reply to Message', 'buddypress' );
 126                      ?></label>
 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>


Generated: Tue Dec 10 01:01:39 2019 Cross-referenced by PHPXref 0.7.1