benecaster_email_editor_template_versions_kept
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
Walkthrough: Change how many earlier versions are kept.
Need this built rather than just documented? See our services →