age_gate/validation/all_rules

This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact a developer for assistance. We are unable to provide support for customisations under our Support Policy.

Description

Allows developers to add to the final validation rules

Parameters

apply_filters('age_gate/validation/all_rules', $rules)
  • $rules (array) The final rules

Example

functions.php

<?php 

add_filter('age_gate/validation/all_rules', function(array $rules) { 
    // do something to the rules
    return $rules; 
});