Home / Documentation / Version 2 / Hooks Reference / Filters / age_gate_field_names
age_gate_field_names
You are reading the documentation for Age Gate 2.x. Switch to the documentation for 3.x.
Description
Allows setting of custom field names in error messages.
This take one parameter in array
format and should return an array
.
Note: Default field names cannot be changed.
add_filter('age_gate_field_names', 'my_field_names', 10, 1);
function my_field_names($names){
return array_merge($names, [
'custom_field_name' => "custom label"
]);
}
Changelog
- Added: 2.0.0