This function adds a custom email to the Emails tab.
(string) (required) The message tag for identifying it.
(string) (required) The heading label for the Emails tab.
(string) (required) The tag for the subject input field.
(string) (required) The tag for the message input field.
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.
Introduced in version 3.1.1
wpmem_add_custom_email() is located in /admin/admin.php.