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


Generated: Sun Jul 12 01:01:53 2020 Cross-referenced by PHPXref 0.7.1