Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/12/2015 11:32:44 PM (9 years ago)
Author:
r-a-y
Message:

bp-legacy: Introduce new template part - /messages/message.php.

This template is used in /messages/single.php during the message loop to
display each message and when a new message is created via AJAX.

This solves an issue where we were duplicating the message markup in two
different spots, which should make message template overrides easier.

Fixes #6572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/messages/single.php

    r9896 r10048  
    4646
    4747        <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
    48 
    49             <div class="message-box <?php bp_the_thread_message_css_class(); ?>">
    50 
    51                 <div class="message-metadata">
    52 
    53                     <?php
    54 
    55                     /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
    56                     do_action( 'bp_before_message_meta' ); ?>
    57 
    58                     <?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ); ?>
    59 
    60                     <?php if ( bp_get_the_thread_message_sender_link() ) : ?>
    61 
    62                         <strong><a href="<?php bp_the_thread_message_sender_link(); ?>" title="<?php bp_the_thread_message_sender_name(); ?>"><?php bp_the_thread_message_sender_name(); ?></a></strong>
    63 
    64                     <?php else : ?>
    65 
    66                         <strong><?php bp_the_thread_message_sender_name(); ?></strong>
    67 
    68                     <?php endif; ?>
    69 
    70                     <span class="activity"><?php bp_the_thread_message_time_since(); ?></span>
    71 
    72                     <?php if ( bp_is_active( 'messages', 'star' ) ) : ?>
    73                         <div class="message-star-actions">
    74                             <?php bp_the_message_star_action_link(); ?>
    75                         </div>
    76                     <?php endif; ?>
    77 
    78                     <?php
    79 
    80                     /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
    81                     do_action( 'bp_after_message_meta' ); ?>
    82 
    83                 </div><!-- .message-metadata -->
    84 
    85                 <?php
    86 
    87                 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
    88                 do_action( 'bp_before_message_content' ); ?>
    89 
    90                 <div class="message-content">
    91 
    92                     <?php bp_the_thread_message_content(); ?>
    93 
    94                 </div><!-- .message-content -->
    95 
    96                 <?php
    97 
    98                 /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
    99                 do_action( 'bp_after_message_content' ); ?>
    100 
    101                 <div class="clear"></div>
    102 
    103             </div><!-- .message-box -->
    104 
     48            <?php bp_get_template_part( 'members/single/messages/message' ); ?>
    10549        <?php endwhile; ?>
    10650
Note: See TracChangeset for help on using the changeset viewer.