i4w_ifcookie

Usage:

This shortcode is designed to check for the existence of a cookie 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_ifcookie] conditional branching is supported.

Shortcode nesting is supported:[i4w_ifcookie1] thru [i4w_ifcookie19]

[ELSE_ifcookie1] thru [ELSE_ifcookie19]

Parameters:

cookie The name of the cookie for whose existence you are checking.
Default: none.
Required: yes.
val A value which the cookie must hold in order for the shortcode to evaluate to true.
Default: none.
Required: no.

Example:

Will display “Test Cookie is set” if a cookie by the name of “test_cookie” exists, without checking the value:

Will display “Test Cookie is set” if a cookie by the name of “test_cookie” exists AND its value is 123.

API:

There is no API function equivalent for this shortcode.