Last active
January 20, 2016 14:56
-
-
Save evrpress/724c0a1c4db3a6050210 to your computer and use it in GitHub Desktop.
Dynamic tags with option example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( function_exists( 'mymail_add_tag' ) ) { | |
function mytag_function($option, $fallback, $campaignID = NULL, $subscriberID = NULL){ | |
if(1 == $option){ | |
$link = 'http://exmaple.com/link1'; | |
}else if(2 == $option){ | |
$link = 'http://exmaple.com/link2'; | |
}else if(3 == $option){ | |
$link = 'http://exmaple.com/link3'; | |
} | |
return $link; | |
} | |
mymail_add_tag('mytag', 'mytag_function'); | |
} | |
/* Usage: | |
{mytag:1} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment