NewsletterServiceProvider
Corex\Newsletter\NewsletterServiceProvider · class · Add-ons layer
Wires the newsletter: bindings, the subscribers table, the newsletter_topic taxonomy, the confirm/unsubscribe link handler, the subscribe REST route, the on-publish notifier, and the email templates (when Corex Mail is active). The table is declared, not created: the migration runner creates it when the version stored for the site differs from the one here, from an admin page, cron, wp corex migrate or a network’s new site. Change the columns and raise the version with them.
Public API
Section titled “Public API”register(): void
Section titled “register(): void”boot(): void
Section titled “boot(): void”install(): void
Section titled “install(): void”Declare the subscribers table to the Data screen, register the topic taxonomy, and register the email templates with Corex Mail.
handleLinks(): void
Section titled “handleLinks(): void”Handle the signed confirm/unsubscribe links from the emails. The token is the authenticator (unforgeable), so these GET links need no nonce — the standard email-link pattern.