Hooks

Local storage

Utilise the browsers local storage functionality rather than cookies to store user data. Useful if a cookie…

Read more

age_gate/validation/all_rules

Allows developers to add to the final validation rules…

Read more

age_gate/ancestor/depth

When using ancestor inheritance, how far up the tree should Age Gate look for options…

Read more

age_gate/cookie/length

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

Read more

Deprecated

All other hooks not listed have been removed in version 3…

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

age_gate_error_{$field}

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

Read more

age_gate_button_message

Allows customisation to the challenge question when using buttons to validate. Two parameters are passed to the…

Read more

age_gate_after

Adds custom content to the end of .age-gate-wrapper…

Read more

post_age_gate_custom_fields

Filter for adding custom form fields after the default fields…

Read more

pre_age_gate_custom_fields

Filter for adding custom form fields before the default fields…

Read more

age_gate_messaging

Applies a filter to the messages Age Gate displays. This takes three parameters: $html: The generated markup…

Read more

age_gate_logo

Allows the logo set for Age Gate to customised. This accepts two parameters: $html: the generated markup…

Read more

age_gate_loading_icon

Allows customisation of the loading icon used in JavaScript mode. Receives the default SVG markup: <svg version="1.1"…

Read more