bp_action_variable( int $position )

Return the value of a given action variable.

Parameters Parameters


(int) (Required) The key of the action_variables array that you want.

Top ↑

Return Return

(string|bool) $action_variable The value of that position in the array, or false if not found.

Source Source

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

function bp_action_variable( $position = 0 ) {
	$action_variables = bp_action_variables();
	$action_variable  = isset( $action_variables[ $position ] )
		? $action_variables[ $position ]
		: false;

	 * Filters the value of a given action variable.
	 * @since 1.5.0
	 * @param string|bool $action_variable Requested action variable based on position.
	 * @param int         $position        The key of the action variable requested.
	return apply_filters( 'bp_action_variable', $action_variable, $position );

Top ↑

Changelog Changelog

Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.