bp_is_current_action( string $action = '' )
Check to see whether the current page matches a given action.
Description Description
Along with bp_is_current_component() and bp_is_action_variable(), this function is mostly used to help determine when to use a given screen function.
In BP parlance, the current_action is the URL chunk that comes directly after the current item slug. E.g., in http://example.com/groups/my-group/members the current_action is ‘members’.
Parameters Parameters
- $action
-
(Optional) The action being tested against.
Default value: ''
Return Return
(bool) True if the current action matches $action.
Source Source
File: bp-core/bp-core-template.php
function bp_is_current_action( $action = '' ) { return (bool) ( $action === bp_current_action() ); }
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |