Home / Documentation / Version 2 / Hooks Reference / Filters / age_gate_button_message
age_gate_button_message
You are reading the documentation for Age Gate 2.x. Switch to the documentation for 3.x.
Description
Allows customisation to the challenge question when using buttons to validate.
Two parameters are passed to the filter, $html
and $raw_message
.
$html
is the standard markup Age Gate will render$raw_message
is the message text without any HTML
Example
Here we’ll replace the standard HTML with a custom H1
element.
add_filter('age_gate_button_message', 'my_challenge_message', 10, 2);
function my_challenge_message($html, $raw_message){
return '<h1 class="my-custom-markup">' . $raw_message . '</h1>';
}
Changelog
- Added: 2.0.0