age_gate/cookie/length

This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact a developer for assistance. We are unable to provide support for customisations under our Support Policy.

Description

Change the length of the default session. Does not affect users selecting remember me.

Changelog

  • Added: 3.0.2

Parameters

apply_filters('age_gate/cookie/length', $length)
  • $length (int) The default length. Default: 0

Example

Set the length of the Age Gate session

functions.php

add_filter('age_gate/cookie/length', 'set_age_gate_cookie_length');

function set_age_gate_cookie_time($length) {
    return 1;
}