bp_get_activity_id()

Return the activity ID.

Description

Return

(int) The activity ID.

Source

File: bp-activity/bp-activity-template.php

677
678
679
680
681
682
683
684
685
686
687
688
function bp_get_activity_id() {
    global $activities_template;
 
    /**
     * Filters the activity ID being displayed.
     *
     * @since BuddyPress 1.2.0
     *
     * @param int $id The activity ID.
     */
    return apply_filters( 'bp_get_activity_id', $activities_template->activity->id );
}

Changelog

Changelog
Version Description
BuddyPress 1.2.0 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.