bp_get_message_thread_last_post_date
Filters the nicely formatted date of the last post in the current thread.
Description
Parameters (1)
- 0. $bp_format_time (string) =>
bp_format_time( strtotime( bp_get_message_thread_last_post_date_raw() ) )
- Formatted date of the last post in the current thread.
Usage
- To run the hook, copy the example below.
- $bp_format_time = apply_filters( 'bp_get_message_thread_last_post_date', $bp_format_time );
- if ( !empty( $bp_format_time ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_message_thread_last_post_date callback
- function filter_bp_get_message_thread_last_post_date( $bp_format_time ) {
- // make filter magic happen here...
- return $bp_format_time;
- };
- // add the filter
- add_filter( 'bp_get_message_thread_last_post_date', 'filter_bp_get_message_thread_last_post_date', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_message_thread_last_post_date', 'filter_bp_get_message_thread_last_post_date', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-messages/bp-messages-template.php
- return apply_filters( 'bp_get_message_thread_last_post_date', bp_format_time( strtotime( bp_get_message_thread_last_post_date_raw() ) ) );