Hi there,
Today, we’ll guide you how to change the email’s header and footer sent to the users in FreelanceEngine.
The email functions are located in “class-ae-mailing.php”. The email content is included in this code:
$this->get_mail_header().$your_content.$this->get_mail_footer()
Therefore you can modify email’s header and footer by overriding 2 functions: get_mail_header, get_mail_footer.
These functions also have a filter which helps you to hook in and change the content in email’s header/footer. You can learn more about WordPress add_filter here
http://codex.wordpress.org/Function_Reference/add_filter
Email’s format is HTML Table.
You can take a look at the example below for details:
add_filter('ae_get_mail_header', 'ae_custom_mail_header'); function ae_custom_mail_header($mail_header) { $mail_header = '<html> <head> </head> <body style="font-family: Arial, sans-serif;font-size: 0.9em;margin: 0; padding: 0; color: #222222;"> <div style="margin: 0px auto; width:600px; "> <table width="100%" cellspacing="0" cellpadding="0"> <tr style=""> <td style="padding: 10px 5px 10px 20px; width: 20%;"> Logo here </td> <td style="padding: 10px 20px 10px 5px"> <span style="text-shadow: 0 0 1px #151515; color: #b0b0b0;">Description</span> </td> </tr> <tr><td colspan="2" style="height: 5px;"></td></tr> <tr> <td colspan="2" style="background: #ffffff; color: #222222; line-height: 18px; padding: 10px 20px;">'; return $mail_header; } add_filter('ae_get_mail_footer', 'ae_custom_mail_footer'); function ae_custom_mail_footer($mail_footer){ $mail_footer = '</td> </tr> <tr> <td colspan="2" style="padding: 10px 20px; color: #666;"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td style="vertical-align: top; text-align: left; width: 50%;">Copy right</td> <td style="text-align: right; width: 50%;">INFO</td> </tr> </table> </td> </tr> </table> </div> </body> </html>'; return $mail_footer; }
Here’s the result: