Linux 软件免费装
Banner图

XYZ Age Verification

开发者 xyzinc
xyzageverify
更新时间 2026年5月25日 22:49
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

age verification age gate age verify age restriction adults only

下载

2.5.1 2.4.2 2.5.0 2.5.2 2.5.3

详情介绍:

Most WordPress age verification plugins are age gates — a popup that asks visitors to click "Yes, I'm 18+" or pick a birthday from a dropdown. Anyone, including a minor, can click through in under a second. That used to be the standard. It is no longer a defensible compliance measure under the UK Online Safety Act, US state age verification laws (Texas, Louisiana, Virginia, and a growing list), or EU age assurance requirements under the Digital Services Act. XYZ Age Verification is different. It confirms visitors are adults using a real-time selfie liveness check, with automatic escalation to government ID verification for borderline cases or stricter age thresholds. No biometric data is stored. No checkbox to lie to. No date-of-birth dropdown that a child can spin in five seconds. When you need this plugin: Why XYZ Age Verification: Free plan included: This plugin includes a free plan with 100 verification credits per month — no credit card required. Register directly from the plugin settings page with just your email. Credits reset monthly. Additional credit packs are available via PayPal for sites that need more capacity; your first purchase includes 300 bonus credits and switches your site to prepaid billing (credits do not expire or reset monthly). How it works:
  1. Visitors from configured regions are redirected to an age verification page.
  2. They complete a face liveness check (Tier 1) or liveness plus government ID verification (Tier 2). Tier 1 produces a binary adult/not-adult result — it does not estimate age.
  3. If the liveness check indicates the visitor may be a minor, the system automatically escalates to government ID verification. For age thresholds other than 18 (e.g., 21+ for alcohol or cannabis), Tier 2 is required because only an ID document provides a verifiable date of birth.
  4. Upon a successful verification, a cryptographically signed cookie is set and the visitor is granted access.
  5. All biometric data, selfies, and document images are discarded immediately after the verification completes — regardless of the result.
Requirements: External service — XYZ Age Verification API: This plugin connects to the XYZ Age Verification API at https://age-verify.xyzinc.com, operated by XY Zinc (a brand of Chaos Unlimited LLC), to perform biometric liveness detection and government ID document verification. The plugin cannot function without this service — it is the core verification engine. When a visitor triggers verification, the plugin sends the visitor's country and state codes (derived from Cloudflare headers) to the API to create a verification session. The visitor then interacts directly with the verification UI hosted by the service. No biometric data passes through your WordPress server. The plugin polls the API for session status and receives only a pass/fail result. Complete feature list:

安装:

  1. Upload the xyz-age-verification-free folder to /wp-content/plugins/.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Go to Settings > Age Verification.
  4. If you don't have an API key, enter your email under "Get Started with a Free Plan" and click Start Free Plan. Check your email to confirm and receive your API key.
  5. Enter your API key in the settings.
  6. Click Fetch from API next to the Cookie Signing Key field to enable secure cookie verification.
  7. Create a WordPress page with the slug age-gate and add the [xyzav_age_verify] shortcode to its content.
  8. Copy mu-plugin/xyz-age-gate-redirect.php from the plugin folder to /wp-content/mu-plugins/. Create the mu-plugins directory if it does not exist.
  9. Go to Settings > Free Plan to configure your regions, welcome content, and verification thresholds.
  10. If using a page cache plugin, exclude /age-gate/ from caching. Note: WP Rocket is not compatible (see FAQ).
  11. Check the Setup Checklist on the settings page to verify all steps are complete.

屏幕截图:

  • Age verification page with QR code and verification options
  • Region management with minimum age configuration
  • Recent verifications with detailed attempt history
  • Plan status showing credit usage and remaining balance
  • Test mode in action — simulating a region with ?reg= parameter

升级注意事项:

2.5.2 Readme overhaul plus a fix for a 404 error when editing country-wide regions in the admin. Recommended for all users with country-level regions configured. 2.5.1 Adds credit pack purchasing via PayPal with a 300-credit bonus on first purchase. Recommended for sites needing more than 100 verifications per month. 2.5.0 Interstitial consent gate eliminates passive bot session creation. Visitor IP now passed to API for per-IP rate limiting. Recommended for all users, especially high-traffic sites. 2.4.2 MU plugin cookie handling optimization and improved phpcs annotations. 2.4.1 Security and compliance improvements for WordPress.org review. Free Plan Admin now uses WP REST API. MU plugin redirect URLs are HMAC-verified. Recommended for all users. 2.3.0 New free plan with 100 monthly credits, built-in region management, configurable fail behavior, and detailed verification history. Recommended for all users. 2.2.0 Security improvements including signed cookies, test mode, and setup checklist. Recommended for all users. 2.1.0 Critical security fix — removes region parameter override vulnerability. Update immediately.

常见问题:

How is this different from other age verification plugins on WordPress.org?

Most plugins listed under "age verification" are technically age gates — a popup with a "Yes, I'm 18+" button or a date-of-birth dropdown. A minor can pass these in seconds by clicking the right button or picking a year. They satisfy a checkbox-level compliance requirement but do not actually verify that the visitor is an adult. XYZ Age Verification performs real verification: a real-time selfie liveness check confirms a living person is present, and a trained classifier evaluates the probability that the person is a minor. Borderline cases automatically escalate to government ID verification. The result is a binary adult/not-adult determination backed by biometrics or a verifiable identity document — not a click. If a self-declaration popup is sufficient for your compliance needs, plenty of free plugins offer that. If you need real verification because of OFCOM, US state laws, EU requirements, or your platform's own policies, this plugin is built for that.

Where is my biometric data stored?

Nowhere. Selfies, liveness frames, and government ID images are processed in real time by the verification service and discarded immediately after the session completes — regardless of the outcome. The only data retained is the verification result (pass/fail), session metadata, a timestamp, and the visitor's IP address (for fraud detection). Date of birth from ID documents is used transiently for age calculation and then discarded. Full details are in the Privacy Policy. This is a fundamental architectural choice. The system does not maintain a database of faces, IDs, or verified identities, so there is no honeypot to breach.

Is this plugin free?

Yes. The plugin itself is completely free and open source. It connects to the XYZ Age Verification API, which includes a free plan with 100 verification credits per month — no credit card required. One credit is consumed per face liveness attempt, three credits total per document verification. Additional credit packs are available for purchase via PayPal at xyzinc.com/credits. Your first purchase includes 300 bonus credits and switches your site to a prepaid billing model — prepaid credits do not expire or reset monthly.

What are verification credits?

Credits represent verification attempts. Each face liveness check (Tier 1) costs 1 credit. Each document verification (Tier 2) costs 3 credits total. Your free plan includes 100 credits per month, resetting on the first of each month. Unused credits do not roll over.

How does the system decide when to ask for ID?

For age thresholds of 18, most visitors complete verification with a quick selfie. The liveness check includes a minor-probability assessment, and any result that crosses a conservative threshold automatically escalates to government ID verification. This means most adult visitors never see the ID step, while visitors whose appearance is ambiguous are asked for verifiable proof. For age thresholds above 18 (e.g., 21+ for alcohol, cannabis, or certain firearms content), ID verification is always required because a selfie alone cannot establish a specific age — only a date of birth from an ID document can. The plugin enforces this automatically for any region configured with a minimum age above 18.

Does Tier 1 estimate the visitor's age?

No. Tier 1 produces a binary adult/not-adult determination, not an age estimate. The underlying classifier evaluates the probability that the subject is a minor; this probability drives the pass, fail, or escalate decision. The system never claims to know a visitor's age from a selfie. Specific age thresholds (21+, 25+, etc.) require Tier 2 because only an ID document supplies a verifiable date of birth.

What happens when my credits run out?

This depends on your API Failure Behavior setting. In "fail open" mode (the default), visitors are allowed through unverified. In "fail closed" mode, visitors are redirected to an error page until credits reset or you purchase additional credits. Verifications already in progress are allowed to complete. You can purchase credit packs at any time from xyzinc.com/credits — your first purchase includes 300 bonus credits. European site operators with regulatory compliance obligations typically need "fail closed."

Why does this plugin require Cloudflare?

The plugin uses Cloudflare's CF-IPCountry and CF-Region-Code headers to determine visitor location for region-specific verification rules. These headers are added automatically when your site is proxied through Cloudflare. A free Cloudflare plan provides these headers.

What happens if the API is unreachable?

The behavior is controlled by the API Failure Behavior setting on the Age Verification settings page. "Fail open" (the default) allows visitors through unverified to prevent your site from going offline. "Fail closed" redirects visitors to an error page. Sites with compliance obligations should generally use "fail closed."

What is the must-use plugin for?

The MU plugin (xyz-age-gate-redirect.php) runs early in the WordPress loading process, before most plugins. It checks Cloudflare geo headers and the verification cookie on every request, redirecting unverified visitors to the age gate page. This early execution is essential for the gate to work reliably and to prevent unverified visitors from briefly seeing protected content.

Is this plugin compatible with WP Rocket?

No. WP Rocket's page cache serves static HTML files via its advanced-cache.php drop-in, which executes before must-use plugins load. This means WP Rocket can serve cached pages to unverified visitors, bypassing the gate entirely. WP Rocket does not currently offer a way to conditionally cache based on cookie presence. Other page cache plugins that respect the standard WordPress loading order are compatible — just exclude /age-gate/ from caching. Confirmed compatible: WP Super Cache (Simple mode only), Jetpack Boost, and W3 Total Cache.

Can visitors bypass the gate with browser dev tools?

The verification cookie is cryptographically signed using HMAC-SHA256. Setting a fake cookie value will not pass signature verification. The verification logic runs at the must-use plugin level before any plugin-level code that could be tampered with via WordPress filters or hooks.

Will the gate block me from my own WordPress admin?

No. The /wp-admin/ area and the login page are always exempted. All logged-in WordPress users are automatically bypassed at the redirect level, so administrators, editors, and other authenticated users will not encounter the gate while browsing the site.

How does this work with membership or subscriber sites?

The gate runs at the must-use plugin level, which executes before WordPress loads user roles. At this stage the plugin can detect that a visitor is logged in but cannot distinguish between an administrator and a regular member. As a result, all logged-in WordPress users bypass the gate, not just administrators. For most sites this is not an issue — anonymous visitors are verified before they can register or log in, so members have already passed verification. However, if your site requires re-verification for content that logged-in members can also access (e.g., tiered content where some sections require re-verification), this plugin alone is not a fit for that use case. Plan your registration flow with this behavior in mind. If you need tighter integration with membership levels — for example, requiring different verification tiers for different membership levels, or protecting media files based on membership — XYZ Protect integrates directly with MemberPress and Paid Memberships Pro to provide membership-aware authorization. It is a separate licensed plugin available at xyzinc.com.

What is the Cookie Signing Key?

The Cookie Signing Key is an HMAC-SHA256 secret used to cryptographically sign verification cookies. This prevents visitors from forging a verification cookie. The key is generated per-site by the XYZ API. Click "Fetch from API" on the settings page to set it up automatically.

How do I know if the plugin is configured correctly?

The settings page includes a Setup Checklist that shows green checkmarks for completed steps and red Xs for missing items. There is also an API Status indicator that tests the connection to the XYZ verification API. Click the Help tab at the top-right of the settings page for a full setup guide and troubleshooting tips.

How do I test the age gate without being in a configured region?

Enable Test Mode in Settings > Age Verification. Once enabled, anyone can add a ?reg= query string parameter to any page URL to simulate a visitor from that region. For example, ?reg=US-TX simulates a visitor from Texas, USA, and ?reg=DE simulates a visitor from Germany. Test mode bypasses both the verification cookie and the logged-in user exemption, so you experience the full verification flow. This works in incognito/private browsing windows without a WordPress login, which is the most common way to test as an anonymous visitor. Remember to disable test mode when you are finished — a persistent admin notice will remind you.

Does this plugin protect files in wp-content/uploads?

No. The gate applies to WordPress pages and posts — it does not restrict direct access to media files served from /wp-content/uploads/. If a visitor knows or guesses the direct URL to an uploaded file, they can access it without verification. This is a limitation of the WordPress architecture: media files are served directly by the web server (Apache/Nginx) and do not pass through WordPress's PHP execution. Protecting uploaded files requires server-level configuration beyond what a free WordPress plugin can provide. For full media file protection alongside age verification — covering images, videos, PDFs, and audio in /wp-content/uploads/ — see XYZ Protect at xyzinc.com. XYZ Protect adds a Cloudflare Worker layer that authorizes every media request before serving the file.

What is the minimum age setting?

Each region can have its own minimum age threshold (default is 18). For regions with a minimum age above 18, the plugin automatically requires Tier 2 verification (government ID) because Tier 1 (face liveness) can only assess minor probability, not exact age. The ID document is needed to extract the date of birth for precise age calculation.

更新日志:

2.5.3 2.5.2 2.5.1 2.5.0 2.4.2 2.4.1 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0