Skip to main content

benecaster_email_editor_wrapper_html

Filter Premium email-editor

Filters the wrapper HTML a show’s branding rendered to, before it is sanitized and stored. A wrapper that loses {{body}} is refused.

Parameters

Name Type Default Description
$html string — The rendered wrapper
$branding array — The branding, documented on `Templates\Branding`
$show_id int — The show, or 0 for the site-wide design

Returns: string

Example

add_filter( 'benecaster_email_editor_wrapper_html', function ( string $html, array $branding, int $show_id ): string {
    return str_replace( '{{body}}', '{{body}}<p>Thanks for listening to {{show_title}}.</p>', $html );
}, 10, 3 );

Notes

Need this built rather than just documented? See our services →