Usage:
This shortcode is designed to check for the existence of a $_GET 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_ifget] conditional branching is supported.
Shortcode nesting is supported:
[i4w_ifget1] thru [i4w_ifget19]
[ELSE_ifget1] thru [ELSE_ifget19]
Parameters:
get | The name of the $_GET variable for whose existence you are checking. Default: none. Required: yes. |
val | A value which the $_GET variable must hold in order for the shortcode to evaluate to true. Default: none. Required: no. |
Example:
Will display “Test GET is set” if $_GET[‘test_get’] exists.
[i4w_ifget get='test_get'] Test GET is set [ELSE_ifget] Test GET is NOT set [/i4w_ifget]
Will display “Test GET is set” if $_GET[‘test_get’] exists AND its value is 123.
[i4w_ifget get='test_get' val=123] Test GET is set [ELSE_ifget] Test GET is NOT set [/i4w_ifget]
API:
There is no API function equivalent for this shortcode.