Require email confirmation before a free follower signup mints a token
Default false — a follower signup mints its token immediately, exactly as before. Return true for a show and a follower signup instead sends a confirmation email (reusing the existing email-first mailbox round trip — no new UI, no second email arrives) and defers minting the token until the recipient clicks it.
Because the unlicensed-follower cap counts tokens, not pending signups, a signup nobody confirms consumes no cap slot at all — this is the control for a show getting spammed on its public follow form.
The filter is checked once, at signup time — it does not need to stay consistent between the signup and the later confirmation click, since the resulting behaviour (mint the token when clicked) does not depend on the filter’s value at click time.
Code
<?php
add_filter( 'benecaster_follower_double_optin', function ( bool $require_confirmation, int $show_id ): bool {
// Require confirmation only on the show that has been targeted by spam.
return 123 === $show_id ? true : $require_confirmation;
}, 10, 2 );
Hooks Used
Need this built rather than just documented? See our services →