Skip to content

Instantly share code, notes, and snippets.

@atwellpub
Created March 5, 2014 05:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save atwellpub/9361899 to your computer and use it in GitHub Desktop.
List of core tokens for call to action templating engine. Originally located in https://github.com/inboundnow/calls-to-action/blob/master/modules/module.calls-to-action.php#L591
<?php
/* replace core tokens if available */
$template = str_replace( '{{cta-id}}' , $selected_cta['id'] , $template );
$template = str_replace( '{{variation-id}}' , $vid , $template );
$template = str_replace( '{{template-urlpath}}' , $selected_cta['templates'][$vid]['urlpath'] , $template );
$template = str_replace( '{{wordpress-ajaxurl}}' , admin_url( 'admin-ajax.php' ) , $template );
$template = str_replace( '{{cta-width}}' , $width , $template );
$template = str_replace( '{{cta-height}}' , $height , $template );
$template = str_replace( '{{width}}' , $w , $template );
$template = str_replace( '{{height}}' , $h , $template );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment