Usage:
This shortcode is designed to check for the existence of a $_REQUEST variable and, given a value to check, for a value match. Any content embedded between the tags will be displayed if the criteria is met.
[ELSE_ifrequest] conditional branching is supported.
Shortcode nesting is supported:
[i4w_ifrequest1] thru [i4w_ifrequest19]
[ELSE_ifrequest1] thru [ELSE_ifrequest19]
Parameters:
get | The name of the $_REQUEST variable for whose existence you are checking. Default: none. Required: yes. |
val | A value which the $_REQUEST variable must hold in order to evaluate to true. Default: none. Required: no. |
Example:
Will display “Test REQUEST is set” if $_REQUEST[‘test_request’] exists.
[i4w_ifrequest request='test_request'] Test REQUEST is set [ELSE_ifrequest] Test REQUEST is NOT set [/i4w_ifrequest]
Will display “Test REQUEST is set” if $_REQUEST[‘test_request’] exists AND its value is 123.
[i4w_ifrequest request='test_request' val=123] Test REQUEST is set to 123 [ELSE_ifrequest] Test REQUEST is NOT set to 123 [/i4w_ifrequest]
API:
There is no API function equivalent for this shortcode.