Changes between Initial Version and Version 1 of Ticket #5121, comment 1
- Timestamp:
- 03/31/2020 09:26:56 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5121, comment 1
initial v1 5 5 6 6 {{{ 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 */ 7 19 function bb_base_get_topic_last_active_timestamp( $topic_id = 0 ) { 8 20 $topic_id = bbp_get_topic_id( $topic_id ); … … 15 27 16 28 if ( ! empty( $reply_id ) ) { 17 returnget_post_field( 'post_date', $reply_id );29 $last_active = get_post_field( 'post_date', $reply_id ); 18 30 } else { 19 returnget_post_field( 'post_date', $topic_id );31 $last_active = get_post_field( 'post_date', $topic_id ); 20 32 } 21 33 } 34 35 return $last_active; 22 36 } 23 37 }}}