Install
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.zipNo 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=trueflag in localStorage so returning users skip the gate. - Adds
age-verifiedclass to<body>when verified. - Can be disabled on specific pages via the filter
auto_age_gate/disabled.
Installation
- Upload the ZIP via Plugins → Add New → Upload Plugin.
- Activate Auto Age Gate (No Button).
- 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.