-
-
Save billerickson/fba188dd5ee526201da1cb12ea1d28a8 to your computer and use it in GitHub Desktop.
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
<?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