Skip to main content

benecaster_email_wrapper_args

Filter Free Since v1.0.0

Filters the context array passed to the email header and footer templates before rendering. Keys: logo_url, show_name, accent_color, footer_text, is_admin_email. Does not fire when the Email Editor add-on is active — the Email Editor controls header/footer rendering directly.

Parameters

Name Type Default Description
$args array Template context: logo_url (string), show_name (string), accent_color (string hex), footer_text (string), is_admin_email (bool)
$email_type string Email type string
$show_id int ID of the show

Returns: array

Example

add_filter( 'benecaster_email_wrapper_args', function( $args, $email_type, $show_id ) {
    // Use a show-specific accent color stored in post meta.
    if ( $show_id ) {
        $brand_color = get_post_meta( $show_id, '_benecaster_brand_color', true );
        if ( $brand_color ) {
            $args['accent_color'] = $brand_color;
        }
    }
    return $args;
}, 10, 3 );