Created
October 18, 2017 08:26
-
-
Save Pebblo/6376cad2620d74cd40b826749eec2aa0 to your computer and use it in GitHub Desktop.
An example of how to include some additional styles within the email messenger content.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Please do not include the opening PHP tag if you already have one | |
function tw_email_messenger_custom_styles( $message_type, $subject, $from, $main_body ) { | |
//Close the PHP tag so you don't need to echo the styles. | |
?> | |
<style type="text/css" media="screen"> | |
@media only screen and (max-width :480px) { | |
body { | |
/*Custom CSS*/ | |
} | |
} | |
</style> | |
<?php | |
//Reopen the PHP to complete the hook. | |
} | |
add_action('AHEE__EE_Email_Messenger_main_wrapper_template_head', 'tw_email_messenger_custom_styles', 10, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment