[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  <?php
   2  /**
   3   * BuddyPress - Members Messages Loop
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  /**
  11   * Fires before the members messages loop.
  12   *
  13   * @since 1.2.0
  14   */
  15  do_action( 'bp_before_member_messages_loop' ); ?>
  16  
  17  <?php if ( bp_has_message_threads( bp_ajax_querystring( 'messages' ) ) ) : ?>
  18  
  19      <h2 class="bp-screen-reader-text"><?php
  20          /* translators: accessibility text */
  21          _e( 'Starred messages', 'buddypress' );
  22      ?></h2>
  23  
  24      <div class="pagination no-ajax" id="user-pag">
  25  
  26          <div class="pag-count" id="messages-dir-count">
  27              <?php bp_messages_pagination_count(); ?>
  28          </div>
  29  
  30          <div class="pagination-links" id="messages-dir-pag">
  31              <?php bp_messages_pagination(); ?>
  32          </div>
  33  
  34      </div><!-- .pagination -->
  35  
  36      <?php
  37  
  38      /**
  39       * Fires after the members messages pagination display.
  40       *
  41       * @since 1.2.0
  42       */
  43      do_action( 'bp_after_member_messages_pagination' ); ?>
  44  
  45      <?php
  46  
  47      /**
  48       * Fires before the members messages threads.
  49       *
  50       * @since 1.2.0
  51       */
  52      do_action( 'bp_before_member_messages_threads' ); ?>
  53  
  54      <form action="<?php echo bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ?>/bulk-manage/" method="post" id="messages-bulk-management">
  55  
  56          <table id="message-threads" class="messages-notices">
  57  
  58              <thead>
  59                  <tr>
  60                      <th scope="col" class="thread-checkbox bulk-select-all"><input id="select-all-messages" type="checkbox"><label class="bp-screen-reader-text" for="select-all-messages"><?php
  61                          /* translators: accessibility text */
  62                          _e( 'Select all', 'buddypress' );
  63                      ?></label></th>
  64                      <th scope="col" class="thread-from"><?php _e( 'From', 'buddypress' ); ?></th>
  65                      <th scope="col" class="thread-info"><?php _e( 'Subject', 'buddypress' ); ?></th>
  66  
  67                      <?php
  68  
  69                      /**
  70                       * Fires inside the messages box table header to add a new column.
  71                       *
  72                       * This is to primarily add a <th> cell to the messages box table header. Use
  73                       * the related 'bp_messages_inbox_list_item' hook to add a <td> cell.
  74                       *
  75                       * @since 2.3.0
  76                       */
  77                      do_action( 'bp_messages_inbox_list_header' ); ?>
  78  
  79                      <?php if ( bp_is_active( 'messages', 'star' ) ) : ?>
  80                          <th scope="col" class="thread-star"><span class="message-action-star"><span class="icon"></span> <span class="screen-reader-text"><?php
  81                              /* translators: accessibility text */
  82                              _e( 'Star', 'buddypress' );
  83                          ?></span></span></th>
  84                      <?php endif; ?>
  85  
  86                      <th scope="col" class="thread-options"><?php _e( 'Actions', 'buddypress' ); ?></th>
  87                  </tr>
  88              </thead>
  89  
  90              <tbody>
  91  
  92                  <?php while ( bp_message_threads() ) : bp_message_thread(); ?>
  93  
  94                      <tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread<?php else: ?> read<?php endif; ?>">
  95                          <td class="bulk-select-check">
  96                              <label for="bp-message-thread-<?php bp_message_thread_id(); ?>"><input type="checkbox" name="message_ids[]" id="bp-message-thread-<?php bp_message_thread_id(); ?>" class="message-check" value="<?php bp_message_thread_id(); ?>" /><span class="bp-screen-reader-text"><?php
  97                                  /* translators: accessibility text */
  98                                  _e( 'Select this message', 'buddypress' );
  99                              ?></span></label>
 100                          </td>
 101  
 102                          <?php if ( 'sentbox' != bp_current_action() ) : ?>
 103                              <td class="thread-from">
 104                                  <?php bp_message_thread_avatar( array( 'width' => 25, 'height' => 25 ) ); ?>
 105                                  <span class="from"><?php _e( 'From:', 'buddypress' ); ?></span> <?php bp_message_thread_from(); ?>
 106                                  <?php bp_message_thread_total_and_unread_count(); ?>
 107                                  <span class="activity"><?php bp_message_thread_last_post_date(); ?></span>
 108                              </td>
 109                          <?php else: ?>
 110                              <td class="thread-from">
 111                                  <?php bp_message_thread_avatar( array( 'width' => 25, 'height' => 25 ) ); ?>
 112                                  <span class="to"><?php _e( 'To:', 'buddypress' ); ?></span> <?php bp_message_thread_to(); ?>
 113                                  <?php bp_message_thread_total_and_unread_count(); ?>
 114                                  <span class="activity"><?php bp_message_thread_last_post_date(); ?></span>
 115                              </td>
 116                          <?php endif; ?>
 117  
 118                          <td class="thread-info">
 119                              <p><a href="<?php bp_message_thread_view_link( bp_get_message_thread_id(), bp_displayed_user_id() ); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( "View Message", 'buddypress' ); ?>" aria-label="<?php esc_attr_e( "View Message", 'buddypress' ); ?>"><?php bp_message_thread_subject(); ?></a></p>
 120                              <p class="thread-excerpt"><?php bp_message_thread_excerpt(); ?></p>
 121                          </td>
 122  
 123                          <?php
 124  
 125                          /**
 126                           * Fires inside the messages box table row to add a new column.
 127                           *
 128                           * This is to primarily add a <td> cell to the message box table. Use the
 129                           * related 'bp_messages_inbox_list_header' hook to add a <th> header cell.
 130                           *
 131                           * @since 1.1.0
 132                           */
 133                          do_action( 'bp_messages_inbox_list_item' ); ?>
 134  
 135                          <?php if ( bp_is_active( 'messages', 'star' ) ) : ?>
 136                              <td class="thread-star">
 137                                  <?php bp_the_message_star_action_link( array( 'thread_id' => bp_get_message_thread_id() ) ); ?>
 138                              </td>
 139                          <?php endif; ?>
 140  
 141                          <td class="thread-options">
 142                              <?php if ( bp_message_thread_has_unread() ) : ?>
 143                                  <a class="read" href="<?php bp_the_message_thread_mark_read_url( bp_displayed_user_id() );?>"><?php _e( 'Read', 'buddypress' ); ?></a>
 144                              <?php else : ?>
 145                                  <a class="unread" href="<?php bp_the_message_thread_mark_unread_url( bp_displayed_user_id() );?>"><?php _e( 'Unread', 'buddypress' ); ?></a>
 146                              <?php endif; ?>
 147                               |
 148                              <a class="delete" href="<?php bp_message_thread_delete_link( bp_displayed_user_id() ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a>
 149  
 150                              <?php
 151  
 152                              /**
 153                               * Fires after the thread options links for each message in the messages loop list.
 154                               *
 155                               * @since 2.5.0
 156                               */
 157                              do_action( 'bp_messages_thread_options' ); ?>
 158                          </td>
 159                      </tr>
 160  
 161                  <?php endwhile; ?>
 162  
 163              </tbody>
 164  
 165          </table><!-- #message-threads -->
 166  
 167          <div class="messages-options-nav">
 168              <?php bp_messages_bulk_management_dropdown(); ?>
 169          </div><!-- .messages-options-nav -->
 170  
 171          <?php wp_nonce_field( 'messages_bulk_nonce', 'messages_bulk_nonce' ); ?>
 172      </form>
 173  
 174      <?php
 175  
 176      /**
 177       * Fires after the members messages threads.
 178       *
 179       * @since 1.2.0
 180       */
 181      do_action( 'bp_after_member_messages_threads' ); ?>
 182  
 183      <?php
 184  
 185      /**
 186       * Fires and displays member messages options.
 187       *
 188       * @since 1.2.0
 189       */
 190      do_action( 'bp_after_member_messages_options' ); ?>
 191  
 192  <?php else: ?>
 193  
 194      <div id="message" class="info">
 195          <p><?php _e( 'Sorry, no messages were found.', 'buddypress' ); ?></p>
 196      </div>
 197  
 198  <?php endif;?>
 199  
 200  <?php
 201  
 202  /**
 203   * Fires after the members messages loop.
 204   *
 205   * @since 1.2.0
 206   */
 207  do_action( 'bp_after_member_messages_loop' );


Generated: Sun Dec 15 01:01:38 2019 Cross-referenced by PHPXref 0.7.1