| 开发者 | flexatech |
|---|---|
| 更新时间 | 2026年8月22日 09:13 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL v2 or later |
| 版权网址: | 版权信息 |
AUTH_KEY in wp-config.php, so no database lookup is needed to verify a link.Order, Password, Invoice) so transactional mail never gets an unsubscribe link and never gets blocked./wp-json/flexa-unsubscribe/v1/, so external integrations can plug in too.
Source code for compiled JavaScript and CSS
The plugin ships with minified/compiled JavaScript and CSS in assets/dist/. The human-readable source code for these assets is publicly available and maintained at:
https://github.com/flexatech/flexa-unsubscribe
Source lives in the apps/admin (admin UI) directory. Build tools used: pnpm, Vite, React, TypeScript. To build from source: clone the repository, run pnpm install in apps/admin, then pnpm build (see the repository README for exact commands). This allows the code to be reviewed, studied, and forked.
Documentation
Full user guide, technical reference, and REST API documentation are hosted at:
https://unsubscribe-doc.flexacommerce.com/
A "Documentation" link is also added to the plugin row on the Plugins screen for one-click access from inside WordPress.
/wp-content/plugins/flexa-unsubscribe, or install through the WordPress Plugins screen.{prefix}flexa_unsubscribes, {prefix}flexa_blocked_emails, {prefix}flexa_unsubscribe_reasons (the last seeded with three default reasons).No. The plugin hooks wp_mail with standard WordPress filters. Any plugin or theme that sends mail via wp_mail is covered automatically.
AUTH_KEY?Every in-flight unsubscribe/resubscribe link becomes invalid, because the HMAC key is AUTH_KEY. New links issued after rotation work normally. Existing records in the database are unaffected.
Unsubscribes is the list of addresses that opted out. Blocked emails is the audit log of outgoing sends that were stopped because they targeted an unsubscribed address. One unsubscribe can cause many blocked-email entries over time.
No - CSV exports contain email addresses. Treat them as PII. The download link is nonce-protected so it's not trivially shareable across sessions.
Yes. Three action hooks fire on opt-out events so you can sync opt-outs to a CRM, ESP, or your own logging:
do_action( 'flexa_unsubscribe_unsubscribed', $email, $reason ) - fires when an address is recorded as unsubscribed. $reason is '' for link-based opt-outs because the public page collects the reason in a follow-up step.do_action( 'flexa_unsubscribe_resubscribed', $email ) - fires when an address is re-subscribed (opted back in).do_action( 'flexa_unsubscribe_email_blocked', $email, $subject ) - fires for each recipient whose outbound email is blocked because they had opted out.@wordpress/i18n only) is unaffected by the 7.1 @wordpress/components and jQuery UI updates, and the plugin does not touch the post editor, media processing, or the editor toolbar.load_plugin_textdomain() call. WordPress loads translations just-in-time for the plugin slug (language packs + bundled languages/ files), so the call was redundant and flagged by Plugin Check.RegisterDev.php) from the distributed build so the WordPress.org Plugin Check no longer flags its dev-only inline script.apps/admin app) and clarify a code comment about how the public unsubscribe/re-subscribe templates sanitize HTML message fields.flexa_unsubscribe_unsubscribed (fires with the email and reason when an address opts out), flexa_unsubscribe_resubscribed (fires with the email when an address opts back in), and flexa_unsubscribe_email_blocked (fires with the recipient and subject when an outbound email is blocked). See the FAQ for signatures and usage.flexa_unsubscribe_hmac_key filter so developers can supply a custom, stable secret for signing unsubscribe/resubscribe links instead of AUTH_KEY. With no filter hooked, behavior is unchanged and existing links keep verifying.Email, Reason, Date shape produced by the existing CSV export, so an export from one site can be re-imported on another. Email is the only required column; Reason and Date are optional. A header row is auto-detected; headerless files are also accepted.unsubscribed_at or reason for a row already on the list). The dialog reports imported / skipped / failed counts and lists the first 100 row-level errors so you can correct the source file.manage_options plus the standard REST nonce.POST /flexa-unsubscribe/v1/unsubscribes/import endpoint accepts a multipart/form-data upload (field file).$_GET['email'] and $_GET['token'] at the read site in the public unsubscribe/resubscribe handler (sanitize_email / sanitize_text_field + wp_unslash), with a documented phpcs:disable WordPress.Security.NonceVerification.Recommended since the HMAC token is the CSRF protection layer for these public links.<style> and <script> blocks in templates/unsubscribe-page.php and templates/resubscribe-page.php with wp_register_style / wp_enqueue_style / wp_add_inline_style (and the script equivalents), so the public templates pass the WP.org Plugin Check enqueue rule.readme.txt./wp-json/flexa-unsubscribe/v1/ covering unsubscribes, blocked emails, re-subscribes, reasons, settings, appearance, and analytics. Every admin screen consumes this API.?page=2&sort=email&order=desc bookmarkable) on every list screen.admin-post.php handlers now verify nonces via check_admin_referer().flexa-su to flexa-unsubscribe - legacy admin bookmarks will 404.flexa_get_analytics_data AJAX endpoint, superseded by the REST /analytics/* routes.