These hooks allow site specific styling and text wrapping to be applied to the URI links generated by the {UNSUBLINK} keyword.
function custom_public_unsublink( $link, $email_type ) {
if ( 'text' === $email_type ) {
return "To unsubscribe click here:\r\n" . $link;
} else {
return 'To unsubscribe click here:
<a href="' . $link . '">' . $link . '</a>';
}
}
add_filter( 's2_unsublink_public', 'custom_public_unsublink', 10, 2 );
function custom_registered_unsublink( $link, $email_type ) {
if ( 'text' === $email_type ) {
return "You may manage your subscription options from your profile\r\n" . $link;
} else {
return sprintf( 'You may manage your subscription options from your <a href="%s">profile</a>', $link );
}
}
add_filter( 's2_unsublink_registered', 'custom_registered_unsublink', 10, 2 );