Technical Docs

Search Documentation

Function: tribe_get_request_var

Tests to see if the requested variable is set either as a post field or as a URL param and returns the value if so.

Located at src/functions/utils.php (Line: 144)


Post data takes priority over fields passed in the URL query. If the field is not set then $default (null unless a different value is specified) will be returned.

The variable being tested for can be an array if you wish to find a nested value.

Parameters summary

(string|array) $var
(mixed) $default

Return value summary



mixed tribe_get_request_var ( string|array $var, mixed $default = null )