[ 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 10.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
  36                      /* translators: %s: message recipients count */
  37                      printf( __( 'Conversation between %s recipients.', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) );
  38                      ?>
  39  
  40                  <?php else : ?>
  41  
  42                      <?php
  43                      /* translators: %s: message recipients list */
  44                      printf( __( 'Conversation between %s.', 'buddypress' ), bp_get_thread_recipients_list() );
  45                      ?>
  46  
  47                  <?php endif; ?>
  48  
  49              </span>
  50  
  51              <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><?php esc_html_e( 'Delete', 'buddypress' ); ?></a>
  52  
  53              <?php if ( bp_get_thread_recipients_count() > 2 ) : ?>
  54  
  55                  <a class="button confirm" href="<?php bp_the_thread_exit_link(); ?>"><?php esc_html_e( 'Exit Conversation', 'buddypress' ); ?></a>
  56  
  57              <?php endif; ?>
  58  
  59              <?php
  60  
  61              /**
  62               * Fires after the action links in the header of a single message thread.
  63               *
  64               * @since 2.5.0
  65               */
  66              do_action( 'bp_after_message_thread_recipients' ); ?>
  67          </p>
  68  
  69          <?php
  70  
  71          /**
  72           * Fires before the display of the message thread list.
  73           *
  74           * @since 1.1.0
  75           */
  76          do_action( 'bp_before_message_thread_list' ); ?>
  77  
  78          <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
  79              <?php bp_get_template_part( 'members/single/messages/message' ); ?>
  80          <?php endwhile; ?>
  81  
  82          <?php
  83  
  84          /**
  85           * Fires after the display of the message thread list.
  86           *
  87           * @since 1.1.0
  88           */
  89          do_action( 'bp_after_message_thread_list' ); ?>
  90  
  91          <?php
  92  
  93          /**
  94           * Fires before the display of the message thread reply form.
  95           *
  96           * @since 1.1.0
  97           */
  98          do_action( 'bp_before_message_thread_reply' ); ?>
  99  
 100          <form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
 101  
 102              <div class="message-box">
 103  
 104                  <div class="message-metadata">
 105  
 106                      <?php
 107  
 108                      /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
 109                      do_action( 'bp_before_message_meta' ); ?>
 110  
 111                      <div class="avatar-box">
 112                          <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
 113  
 114                          <strong><?php _e( 'Send a Reply', 'buddypress' ); ?></strong>
 115                      </div>
 116  
 117                      <?php
 118  
 119                      /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
 120                      do_action( 'bp_after_message_meta' ); ?>
 121  
 122                  </div><!-- .message-metadata -->
 123  
 124                  <div class="message-content">
 125  
 126                      <?php
 127  
 128                      /**
 129                       * Fires before the display of the message reply box.
 130                       *
 131                       * @since 1.1.0
 132                       */
 133                      do_action( 'bp_before_message_reply_box' ); ?>
 134  
 135                      <label for="message_content" class="bp-screen-reader-text"><?php
 136                          /* translators: accessibility text */
 137                          _e( 'Reply to Message', 'buddypress' );
 138                      ?></label>
 139                      <textarea name="content" id="message_content" rows="15" cols="40"></textarea>
 140  
 141                      <?php
 142  
 143                      /**
 144                       * Fires after the display of the message reply box.
 145                       *
 146                       * @since 1.1.0
 147                       */
 148                      do_action( 'bp_after_message_reply_box' ); ?>
 149  
 150                      <div class="submit">
 151                          <input type="submit" name="send" value="<?php esc_attr_e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/>
 152                      </div>
 153  
 154                      <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
 155                      <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
 156                      <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
 157  
 158                  </div><!-- .message-content -->
 159  
 160              </div><!-- .message-box -->
 161  
 162          </form><!-- #send-reply -->
 163  
 164          <?php
 165  
 166          /**
 167           * Fires after the display of the message thread reply form.
 168           *
 169           * @since 1.1.0
 170           */
 171          do_action( 'bp_after_message_thread_reply' ); ?>
 172  
 173      <?php endif; ?>
 174  
 175      <?php
 176  
 177      /**
 178       * Fires after the display of a single member message thread content.
 179       *
 180       * @since 1.1.0
 181       */
 182      do_action( 'bp_after_message_thread_content' ); ?>
 183  
 184  </div>


Generated: Fri Apr 19 01:01:08 2024 Cross-referenced by PHPXref 0.7.1