Skip to content

Instantly share code, notes, and snippets.

@klhall1987
Last active August 22, 2018 18:02
Show Gist options
  • Save klhall1987/ab64e3641dbfa41520deaabb5fe83ba7 to your computer and use it in GitHub Desktop.
Save klhall1987/ab64e3641dbfa41520deaabb5fe83ba7 to your computer and use it in GitHub Desktop.
Register Merge Tags example
<?php
public function __construct()
{
/*
* Required for all Extensions.
*/
add_action( 'admin_init', array( $this, 'setup_license') );
// Call our register merge tags method.
add_action( 'ninja_forms_loaded', array( $this, 'register_mergetags' ) );
}
/**
* Register Merge Tags Call Back
*/
public function register_mergetags()
{
Ninja_Forms()->merge_tags[ 'merge_tag_example' ] = new NF_MergeTagExample_MergeTags();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment