nua_email_tags

Modify the list of email tags that are used in the New User Approve plugin. You can both add a new tag to the list or remove a tag that you feel you won’t need.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * Add a new email tag
 * $tags an array of the current email tags
 */
function add_email_tag( $tags ) {
    $tags[] = array(
    'tag'         => 'some_url',
    'description' => __( 'Some URL to add to the New User Approve emails' ),
    'function'    => 'my_new_email_tag',
    'context'     => array( 'email' ),
    );
}
add_filter( 'nua_email_tags', 'add_email_tag' );
 
/**
 * Now when I add '{some_url}' to an email template, that text will be
 * replaced by using the function below.
 */
function my_new_email_tag() {
    return 'http://some-url.com/';
}
Scroll to Top