Description
This function adds a custom email to the Emails tab.
Parameters
$tag
(string) (required) The message tag for identifying it.
$heading
(string) (required) The heading label for the Emails tab.
$subject_input
(string) (required) The tag for the subject input field.
$message_input
(string) (required) The tag for the message input field.
Usage
To add a custom email in the WP-Members Emails tab, this function should be hooked to the wpmem_after_admin_init action. The $tag, $subject_input, and $message_input are “tags” and should be unique values. Otherwise, they will conflict with other fields on the tab. The $heading value is what will display for the inputs when viewing the Emails tab.
The email will be saved as a setting in the wp_options table. The $tag value will be the option name, which can be retrieved with get_option(). The setting is an array where the key ‘subj’ is the email subject value and ‘body’ is the email message body.
Changelog
Introduced in version 3.1.1
Source
wpmem_add_custom_email() is located in /admin/admin.php.