bbp_get_forum_last_reply_id( int $forum_id )

Return the forums last reply id

Description

Parameters

$forum_id

(Optional) Forum id

Return

(int) Forum's last reply id

Source

File: bp-forums/forums/template.php

1167
1168
1169
1170
1171
1172
1173
1174
1175
function bbp_get_forum_last_reply_id( $forum_id = 0 ) {
    $forum_id = bbp_get_forum_id( $forum_id );
    $reply_id = get_post_meta( $forum_id, '_bbp_last_reply_id', true );
 
    if ( empty( $reply_id ) )
        $reply_id = bbp_get_forum_last_topic_id( $forum_id );
 
    return (int) apply_filters( 'bbp_get_forum_last_reply_id', (int) $reply_id, $forum_id );
}

Changelog

Changelog
Version Description
bbPress (r2464) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.