Documentation » Filter Hooks

groundhogg/get_default_from_name

Published · Last updated

Filters the default From name used when sending Groundhogg emails.

apply_filters( 'groundhogg/get_default_from_name', $from_name );

You will receive the default from name string.

Example

add_filter( 'groundhogg/get_default_from_name', 'my_extension_dynamic_from_name' );

/**
 * Use the current site name as the from name.
 *
 * @param string $from_name
 *
 * @return string
 */
function my_extension_dynamic_from_name( $from_name ) {
    return get_bloginfo( 'name' );
}