Filter
rpress_email_templates
On this page
Filters the list of available email templates.
Applied at the end of RPRESS_Emails::get_templates(). The default array has the default template and the none template, which sends plain text without HTML wrapping. The list is also returned by rpress_get_email_templates(). A custom template also needs the template parts or an rpress_email_template_{$template} action to render.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$templates | array | Associative array of template slug => label. |
Return value#
array. The available templates.
Example#
function my_email_templates( $templates ) {
$templates['compact'] = __( 'Compact Template', 'my-plugin' );
return $templates;
}
add_filter( 'rpress_email_templates', 'my_email_templates' );
Source#
Applied in:
includes/emails/class-rpress-emails.php(line 208), inRPRESS_Emails::get_templates()
See also#
rpress_email_templaterpress_email_template_%7B%24template%7D
Was this page helpful?
