// Check time and use current if empty
if ( empty( $new_time ) )
$new_time = get_post_field( 'post_date', bbp_get_public_child_last_id( $topic_id, bbp_get_reply_post_type() ) );
// Update only if published
if ( !empty( $new_time ) )
update_post_meta( $topic_id, '_bbp_last_active_time', $new_time );
return apply_filters( 'bbp_update_topic_last_active_time', $new_time, $topic_id );
}
/**
* Update the topic with the most recent reply ID
*
* @since bbPress (r2625)
*
* @param int $topic_id Optional. Topic id to update
* @param int $reply_id Optional. Reply id
* @uses bbp_is_reply() To check if the passed topic id is a reply