bookmark_bordergform_batchbook_tags

Description

This filter is used to dynamically alter the tags to be assigned to a BatchBook contact.

Usage

The following would apply to all feeds:

add_filter( 'gform_batchbook_tags', 'your_function_name', 10, 4 );

To target feeds for a specific form append the form id to the hook name. (format: gform_batchbook_tags_FORMID)

add_filter( 'gform_batchbook_tags_4', 'your_function_name', 10, 4 );

Parameters

  • $tags array

    An array of tags to be assigned to the contact.

  • $feed Feed Object

    The feed currently being processed.

  • $entry Entry Object

    The entry currently being processed.

  • $form

    The form currently being processed.

Examples

This example shows how you can add a new tag.

add_filter( 'gform_batchbook_tags', 'add_new_tag', 10, 4 );
function add_new_tag( $tags, $feed, $entry, $form ) {
    $tags[] = 'some tag';

    return $tags;
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

apply_filters( 'gform_batchbook_tags_' . $form['id'], apply_filters( 'gform_batchbook_tags', $tags, $feed, $entry, $form ), $feed, $entry, $form );

This filter is located in GFBatchbook::add_person_tags() in class-gf-batchbook.php