- Timestamp:
- 05/06/2015 04:04:09 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r9819 r9838 1484 1484 if ( !empty( $result ) ) { 1485 1485 1486 // Get the zebra line classes correct on ajax requests1486 // pretend we're in the message loop 1487 1487 global $thread_template; 1488 1488 1489 1489 bp_thread_has_messages( array( 'thread_id' => (int) $_REQUEST['thread_id'] ) ); 1490 1490 1491 // set the current message to the 2nd last 1492 $thread_template->message = end( $thread_template->thread->messages ); 1493 $thread_template->message = prev( $thread_template->thread->messages ); 1494 1495 // set current message to current key 1496 $thread_template->current_message = key( $thread_template->thread->messages ); 1497 1498 // now manually iterate message like we're in the loop 1491 1499 bp_thread_the_message(); 1492 1500 1493 if ( $thread_template->message_count % 2 == 1 ) { 1494 $class = 'odd'; 1495 } else { 1496 $class = 'even alt'; 1497 } ?> 1498 1499 <div class="message-box new-message <?php echo $class; ?>"> 1501 // manually call oEmbed 1502 // this is needed because we're not at the beginning of the loop 1503 bp_messages_embed() 1504 ?> 1505 1506 <div class="message-box new-message <?php bp_the_thread_message_css_class(); ?>"> 1500 1507 <div class="message-metadata"> 1501 1508 <?php 1502 1509 1503 1510 /** 1504 * Fires before the notifications for private messages.1511 * Fires before the single message header is displayed. 1505 1512 * 1506 1513 * @since BuddyPress (1.1.0) … … 1514 1521 1515 1522 /** 1516 * Fires after the notifications for private messages.1523 * Fires after the single message header is displayed. 1517 1524 * 1518 1525 * @since BuddyPress (1.1.0) … … 1531 1538 1532 1539 <div class="message-content"> 1533 <?php 1534 1535 /** This filter is documented in bp-messages/bp-messages-template.php */ 1536 echo stripslashes( apply_filters( 'bp_get_the_thread_message_content', $_REQUEST['content'] ) ); ?> 1540 <?php bp_the_thread_message_content(); ?> 1537 1541 </div> 1538 1542 … … 1549 1553 </div> 1550 1554 <?php 1555 // clean up the loop 1556 bp_thread_messages(); 1557 1551 1558 } else { 1552 1559 echo "-1<div id='message' class='error'><p>" . __( 'There was a problem sending that reply. Please try again.', 'buddypress' ) . '</p></div>';
Note: See TracChangeset
for help on using the changeset viewer.