/** * Returns the last post author for a forum. * * @since 1.0.0 * @access public * @param int $forum_id * @return string */ function mb_get_forum_last_post_author($forum_id = 0) { $forum_id = mb_get_forum_id($forum_id); $last_id = mb_get_forum_last_post_id($forum_id); $author = ''; if ($last_id) { $author = mb_is_reply($last_id) ? mb_get_reply_author($last_id) : mb_get_topic_author($last_id); } return apply_filters('mb_get_forum_last_post_author', $author, $forum_id); }
/** * Returns the last post author for a topic. * * @since 1.0.0 * @access public * @param int $topic_id * @return string */ function mb_get_topic_last_poster($topic_id = 0) { $topic_id = mb_get_topic_id($topic_id); $reply_id = mb_get_topic_last_reply_id($topic_id); $author = !empty($reply_id) ? mb_get_reply_author($reply_id) : mb_get_topic_author($topic_id); return apply_filters('mb_get_topic_last_poster', $author, $reply_id, $topic_id); }