bp_current_action()

Return the name of the current action.

Description

Return

(string) Action name.

Source

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

1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
function bp_current_action() {
    $bp             = buddypress();
    $current_action = !empty( $bp->current_action )
        ? $bp->current_action
        : '';
 
    /**
     * Filters the name of the current action.
     *
     * @since BuddyPress 1.0.0
     *
     * @param string $current_action Current action.
     */
    return apply_filters( 'bp_current_action', $current_action );
}

Changelog

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