age_gate/ancestor/depth

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.
This feature is marked as in development and may not perform as expected in all browsers.

Description

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

Changelog

  • Added: 3.1.0

Parameters

apply_filters('age_gate/ancestor/depth', $number)
  • $number (int) How many levels to look up the tree. Default 1

Example

functions.php

<?php

add_filter('age_gate/ancestor/depth', function($number) {
    return 2;
});