v2
Age Gate
From 2.9.0 Age Gate is available as a shortcode on top of the standard overlay. The shortcode…
Shortcodes
Age Gate Regions
Age Gate regions adds in depth regional data to Age Gate allowing customisable ages on a per…
Extensions
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…
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;…
Event Listeners
In the JavaScript version of Age Gate, there are two event listeners fired, agegateshown and agegatepassed. These…
JavaScript
Screen types
Some filters accept a screen type parameter. Possible screen types are: front page home attachment single category…
Miscellaneous
Adding custom markup
You can add custom markup to the Age Gate via two filters: age_gate_before and age_gate_after. Examples Adding…
CSS Reference
Class Description .age-restriction Added to the body element. .age-gate-wrapper A wrapper div containing all age…
age_gate_error_{$field}
Allows customisation of individual error messages. This filter takes two parameters: $message: The default message for the…