Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created December 21, 2016 16:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/fba188dd5ee526201da1cb12ea1d28a8 to your computer and use it in GitHub Desktop.
Save billerickson/fba188dd5ee526201da1cb12ea1d28a8 to your computer and use it in GitHub Desktop.
<?php
/**
* Custom Smart Tags
*
* @author Bill Erickson
* @see http://www.billerickson.net/code/wpforms-custom-smart-tags
*/
function ea_custom_smart_tags( $content, $tag ) {
if( 'my_smart_tag' == $tag ) {
$value = 'Testing 1 2 3';
$content = str_replace( '{' . $tag . '}', $value, $content );
}
return $content;
}
add_filter( 'wpforms_smart_tag_process', 'ea_custom_smart_tags', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment