diff --git src/bp-templates/bp-nouveau/includes/messages/ajax.php src/bp-templates/bp-nouveau/includes/messages/ajax.php
index d27365d03..ee624657a 100644
|
|
|
function bp_nouveau_ajax_get_thread_messages() { |
| 494 | 494 | $thread->messages[ $i ]['star_nonce'] = wp_create_nonce( 'bp-messages-star-' . bp_get_the_thread_message_id() ); |
| 495 | 495 | } |
| 496 | 496 | |
| | 497 | /** |
| | 498 | * Filter here to include your meta data to one or more messages of the thread. |
| | 499 | * |
| | 500 | * @since ? |
| | 501 | * |
| | 502 | * @param array $message_meta An associative array keyed using the meta_key. |
| | 503 | * @param array $message The current message in the loop. |
| | 504 | */ |
| | 505 | $message_meta = (array) apply_filters( 'bp_nouveau_ajax_get_thread_message_meta', array(), $thread->messages[ $i ] ); |
| | 506 | |
| | 507 | if ( $message_meta ) { |
| | 508 | $thread->messages[ $i ]['meta'] = $message_meta; |
| | 509 | } |
| | 510 | |
| 497 | 511 | $extra_content = bp_nouveau_messages_catch_hook_content( array( |
| 498 | 512 | 'beforeMeta' => 'bp_before_message_meta', |
| 499 | 513 | 'afterMeta' => 'bp_after_message_meta', |
| … |
… |
function bp_nouveau_ajax_get_thread_messages() { |
| 513 | 527 | // Remove the bp_current_action() override. |
| 514 | 528 | $bp->current_action = $reset_action; |
| 515 | 529 | |
| | 530 | /** |
| | 531 | * Filter here to include your meta data to the main message of the thread. |
| | 532 | * |
| | 533 | * @since ? |
| | 534 | * |
| | 535 | * @param array $thread_meta An associative array keyed using the meta_key. |
| | 536 | * @param array $thread The current message in the loop. |
| | 537 | */ |
| | 538 | $thread_meta = (array) apply_filters( 'bp_nouveau_ajax_get_thread_meta', array(), $thread->thread ); |
| | 539 | |
| | 540 | if ( $thread_meta ) { |
| | 541 | $thread->thread['meta'] = $thread_meta; |
| | 542 | } |
| | 543 | |
| 516 | 544 | wp_send_json_success( $thread ); |
| 517 | 545 | } |
| 518 | 546 | |