Docs

evf_setcookie( string $name, string $value, integer $expire, bool $secure = false, bool $httponly = false )

Set a cookie – wrapper for setcookie using WP constants.

Parameters

$namestringrequired
Name of the cookie being set.
$valuestringrequired
Value of the cookie.
$expireintegerrequired
Expiry of the cookie.
$securebooloptional
Whether the cookie should be served only over https.

Default:false

$httponlybooloptional
Whether the cookie is only accessible over HTTP, not scripting languages like JavaScript. @since 1.4.9.

Default:false