WP Manifestindependent plugin directory
manifest / users / wp-custom-snippets

Auto Age Gate (No Button) — Per Tab Session (Front-End Only + Editor Safe)

A collection of reusable custom code snippets and hooks for WordPress and WooCommerce projects.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sabuj71/wp-custom-snippets/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Auto Age Gate (No Button)

A super-lightweight age verification overlay that auto-submits with MM/DD/YYYY fields—no button required. Persists via localStorage.

Description

  • Shows a full-screen overlay asking for MM/DD/YYYY.
  • Auto-focuses through fields and verifies once complete.
  • Stores a verified=true flag in localStorage so returning users skip the gate.
  • Adds age-verified class to <body> when verified.
  • Can be disabled on specific pages via the filter auto_age_gate/disabled.

Installation

  1. Upload the ZIP via Plugins → Add New → Upload Plugin.
  2. Activate Auto Age Gate (No Button).
  3. Visit your site (in an incognito window) to test the overlay.

Developer

Disable the gate via a filter:

add_filter('auto_age_gate/disabled', '__return_true'); // disables globally

Or conditionally:

add_filter('auto_age_gate/disabled', function($disabled){
  if (is_user_logged_in() || is_page('privacy-policy')) return true;
  return $disabled;
});

Changelog

1.0.0

  • Initial release.