getSettings(); $manual_delete_value = isset( $settings['delete_unconfirmed'] ) ? $settings['delete_unconfirmed'] : 1; $manual_delete_period = isset( $settings['delete_unconfirmed_period'] ) ? $settings['delete_unconfirmed_period'] : 'months'; $admin_email = get_option( 'admin_email' ); $done_form_id = isset( $done_form_id ) ? (int) $done_form_id : 0; $done_bulk = ! empty( $done_bulk ); $done_count = isset( $done_count ) ? (int) $done_count : 0; $reoptin_form_id = isset( $reoptin_form_id ) ? (int) $reoptin_form_id : 0; $affected_hash = isset( $affected_hash ) ? (string) $affected_hash : ''; $resolver = new OptOutConfigResolver(); // Helper closure for label lookups so the template stays compact. $L = static function ( string $key ) use ( $resolver ): string { return $resolver->labelText( $key ); }; // Count active rows so the bulk button can be hidden when there's // nothing to cancel. $activeCount = 0; foreach ( $list as $OptIn ) { if ( $OptIn->is_confirmed() ) { $activeCount++; } } ?>
listNoticeText( 'cancelled_all', 'title' ) ); ?>

listNoticeText( 'cancelled_all', 'body' ), $done_count ) ); ?>

0 ) : $doneTitle = get_the_title( $done_form_id ); if ( $doneTitle === '' ) { $doneTitle = sprintf( __( 'Form #%d', 'double-opt-in' ), $done_form_id ); } ?>
listNoticeText( 'cancelled', 'title' ) ); ?>

listNoticeText( 'cancelled', 'body' ), $doneTitle ) ); ?>

0 ) : $reoptinTitle = get_the_title( $reoptin_form_id ); if ( $reoptinTitle === '' ) { $reoptinTitle = sprintf( __( 'Form #%d', 'double-opt-in' ), $reoptin_form_id ); } ?>
listNoticeText( 'reactivated', 'title' ) ); ?>

listNoticeText( 'reactivated', 'body' ), $reoptinTitle ) ); ?>

1 ) : // Pre-encode the hash so add_query_arg's =-eating // regex doesn't strip the base64 padding (see // OptOutHandler::doRedirect for the full story). $encodedHash = rawurlencode( $hash ); $bulkUrl = add_query_arg( array( 'optout_all' => $encodedHash, 'hash' => $encodedHash ), get_permalink() ); ?> get_cf_form_id(); $formTitle = $formId > 0 ? get_the_title( $formId ) : ''; if ( $formTitle === '' ) { $formTitle = sprintf( __( 'Form #%d', 'double-opt-in' ), $formId ); } $isConfirmed = $OptIn->is_confirmed(); // Highlight only the SPECIFIC row that was just // acted on. Matching on $affected_hash means a // click on one of N identical-form duplicates // highlights just that one (was form_id before; // caught every duplicate, user-reported 2026-05-15). $justDone = ( $affected_hash !== '' && $OptIn->get_hash() === $affected_hash ); $rowClass = $justDone ? 'f12-doi-optout-row--justdone' : ''; ?>
*
get_createtime( 'view' ) ); ?> get_valid_until() ); ?> ( ) ( ) rawurlencode( $OptIn->get_hash() ), 'hash' => rawurlencode( $hash ), ), get_permalink() ); ?> &hash=` // keeps the list-rendering hash on the // redirect target so the table comes // back with the row highlighted. // Pre-encoded to dodge add_query_arg's // =-stripping regex on base64 padding. $reoptinUrl = add_query_arg( array( 'reoptin' => rawurlencode( $OptIn->get_hash() ), 'hash' => rawurlencode( $hash ), ), get_permalink() ); ?>
* *