Skip to content

Instantly share code, notes, and snippets.

@evrpress
Last active January 20, 2016 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evrpress/724c0a1c4db3a6050210 to your computer and use it in GitHub Desktop.
Save evrpress/724c0a1c4db3a6050210 to your computer and use it in GitHub Desktop.
Dynamic tags with option example
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