Skip to content

Instantly share code, notes, and snippets.

@danngyw
Created June 18, 2015 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danngyw/e9eb15c237868e7a9557 to your computer and use it in GitHub Desktop.
Save danngyw/e9eb15c237868e7a9557 to your computer and use it in GitHub Desktop.
Add filter to remove header logo and footer contact info
add_filter('et_get_mail_header','remove_logo_in_email');
function remove_logo_in_email(){
$mail_header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
</head>
<body style="font-family: Arial, sans-serif;font-size: 0.9em;margin: 0; padding: 0; color: #222222;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td colspan="2" style="height: 5px; width:100%; background-color: ' . $customize['background'] . ';"></td></tr>
<tr>
<td colspan="2" style="background: #ffffff; width:100%; color: #222222; line-height: 18px; padding: 10px 20px;">';
return $mail_header;
}
add_filter('et_get_mail_footer','remove_contact_info_in_footer_email');
function remove_contact_info_in_footer_email(){
$mail_footer = '</td>
</tr>
<tr>
<td colspan="2" style="background: ' . $customize['background'] . '; padding: 10px 20px; color: #666;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td style="vertical-align: top; text-align: left; width: 50%;">' . $copyright . '</td>
<td style="text-align: right; width: 50%;"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>';
return $mail_footer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment