age_gate/cookie/time

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 time scale of the default session. Does not affect users selecting remember me.

Expects one of days, hours orĀ minutes to be returned.

Changelog

  • Added: 3.0.2

Parameters

apply_filters('age_gate/cookie/time', $timescale)
  • $timescale (string) The timescale to use. Default 'days'

Example

Set the timescale of default Age Gate sessions

functions.php

add_filter('age_gate/cookie/time', 'set_age_gate_cookie_time');

function set_age_gate_cookie_time($timescale) {
    return 'hours';
}