Optin Optin
Use code:
0 Day
00 Hour
00 Min
00 Sec
Logo

Documentation

  1. Home
  2. /
  3. Subscribe2
  4. /
  5. Hooks, API & Customi...
  6. /
  7. s2_unsublink_public s2_un...

s2_unsublink_public s2_unsublink_registered

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 );
Still stuck? Contact

How can we help?

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We got your message

We will reply to you very soon :)