Description
Set the email headers for the wp_mail() call
Usage
$mixed = oiksp_get_email_headers( $headers, $fields );Parameters
- $headers
- ( mixed ) optional – normally an array of headers
- $fields
- ( mixed ) optional – array of fields that may get updated
Returns
mixed filtered headersSource
File name: oik-squeeze/includes/oik-squeeze-email.incLines:
1 to 16 of 16
function oiksp_get_email_headers( $headers=null, &$fields=array() ) { $fields['from'] = bw_array_get_dcb( $fields, 'from', "email", "bw_get_option", "bw_options" ); $fields['contact'] = bw_array_get_dcb( $fields, 'contact', 'contact', "bw_get_option", "bw_options" ); $fields['bcc'] = $fields['from']; if ( null == $headers ) { $headers[] = "From: %contact% <%from%>"; /** Only copy the mail list owner when it's not double opt-in */ if ( null === $fields['confirm']) { $headers[]="Bcc: %bcc%"; } $headers[] = "content-type: text/html"; } add_filter( "oiksp_email_headers", "oiksp_replace_fields", 1, 2 ); $headers = apply_filters( "oiksp_email_headers", $headers, $fields ); return( $headers ); }View on GitHub
