Documentation » Filter Hooks

groundhogg/email_template/footer_text

Published · Last updated

Filters the custom footer text block that appears in the Groundhogg email footer. Use this to add a dynamic legal disclaimer or branding statement.

apply_filters( 'groundhogg/email_template/footer_text', $footer_text );

You will receive the current footer text string (empty by default unless set in settings).

Example

add_filter( 'groundhogg/email_template/footer_text', 'my_extension_add_footer_disclaimer' );

/**
 * Append a regulatory disclaimer to the email footer.
 *
 * @param string $footer_text
 *
 * @return string
 */
function my_extension_add_footer_disclaimer( $footer_text ) {
    $disclaimer = get_option( 'my_extension_email_disclaimer', '' );

    if ( $disclaimer ) {
        $footer_text .= '' . wp_kses_post( $disclaimer );
    }

    return $footer_text;
}