Skip to main content

benecaster_email_editor_template_versions_kept

Filter Premium email-editor

Filters how many earlier versions of an email design are kept. The default is 20, and 0 keeps none.

Parameters

Name Type Default Description
$keep int — How many to keep
$type string — The email type, or `_wrapper` for a show's branding
$show_id int — The show, or 0 for the site-wide design

Returns: int

Example

add_filter( 'benecaster_email_editor_template_versions_kept', function ( int $keep, string $type, int $show_id ): int {
    return 'welcome' === $type ? 50 : 10;
}, 10, 3 );

Notes

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