v2

Age Gate

From 2.9.0 Age Gate is available as a shortcode on top of the standard overlay. The shortcode…

Read more

Age Gate Regions

Age Gate regions adds in depth regional data to Age Gate allowing customisable ages on a per…

Read more

Hooks

From 2.3.0, certain filters are available natively in JavaScript. Currently, the following filters are available: age_gate_restricted age_gate_set_cookie…

Read more

age_gate_select_years

Give the ability to change the lower end of the year select dropdown. add_filter('age_gate_select_years', function($min_years){ return 1950;…

Read more

Event Listeners

In the JavaScript version of Age Gate, there are two event listeners fired, agegateshown and agegatepassed. These…

Read more

Screen types

Some filters accept a screen type parameter. Possible screen types are: front page home attachment single category…

Read more

Adding custom markup

You can add custom markup to the Age Gate via two filters: age_gate_before and age_gate_after. Examples Adding…

Read more

CSS Reference

Class Description .age-restriction Added to the body element. .age-gate-wrapper A wrapper div containing all age…

Read more

age_gate_error_{$field}

Allows customisation of individual error messages. This filter takes two parameters: $message: The default message for the…

Read more