Making WordPress.org

Changes between Initial Version and Version 1 of Ticket #5121, comment 1


Ignore:
Timestamp:
03/31/2020 09:26:56 AM (5 years ago)
Author:
TweetyThierry
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5121, comment 1

    initial v1  
    55
    66{{{
     7/**
     8 * Return the topics last update date.
     9 *
     10 * @param int $topic_id Optional. Topic id.
     11 *
     12 * @uses bbp_get_topic_id() To get topic id
     13 * @uses get_post_meta() To get the topic lst active meta
     14 * @uses bbp_get_topic_last_reply_id() To get topic last reply id
     15 * @uses get_post_field() To get the post date of topic/reply
     16 *
     17 * @return string Topic last active date.
     18 */
    719function bb_base_get_topic_last_active_timestamp( $topic_id = 0 ) {
    820        $topic_id = bbp_get_topic_id( $topic_id );
     
    1527
    1628                if ( ! empty( $reply_id ) ) {
    17                         return get_post_field( 'post_date', $reply_id );
     29                        $last_active = get_post_field( 'post_date', $reply_id );
    1830                } else {
    19                         return get_post_field( 'post_date', $topic_id );
     31                        $last_active = get_post_field( 'post_date', $topic_id );
    2032                }
    2133        }
     34
     35        return $last_active;
    2236}
    2337}}}