Move email footer insline styling to email-styles template for use with imogrifier instead.

This commit is contained in:
Gerhard 2015-03-11 13:03:15 +02:00
parent 2faf92b018
commit f64ed79780
2 changed files with 11 additions and 22 deletions

View File

@ -4,32 +4,13 @@
*
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 2.0.0
* @version 2.3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
// Load colours
$base = get_option( 'woocommerce_email_base_color' );
$base_lighter_40 = wc_hex_lighter( $base, 40 );
// For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline.
$template_footer = "
border-top:0;
-webkit-border-radius:6px;
";
$credit = "
border:0;
color: $base_lighter_40;
font-family: Arial;
font-size:12px;
line-height:125%;
text-align:center;
";
?>
</div>
</td>
@ -45,12 +26,12 @@ $credit = "
<tr>
<td align="center" valign="top">
<!-- Footer -->
<table border="0" cellpadding="10" cellspacing="0" width="600" id="template_footer" style="<?php echo $template_footer; ?>">
<table border="0" cellpadding="10" cellspacing="0" width="600" id="template_footer">
<tr>
<td valign="top">
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td colspan="2" valign="middle" id="credit" style="<?php echo $credit; ?>">
<td colspan="2" valign="middle" id="credit">
<?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ) ) ); ?>
</td>
</tr>

View File

@ -18,6 +18,7 @@ $text = get_option( 'woocommerce_email_text_color' );
$bg_darker_10 = wc_hex_darker( $bg, 10 );
$base_lighter_20 = wc_hex_lighter( $base, 20 );
$base_lighter_40 = wc_hex_lighter( $base, 40 );
$text_lighter_20 = wc_hex_lighter( $text, 20 );
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
@ -54,9 +55,16 @@ $text_lighter_20 = wc_hex_lighter( $text, 20 );
#template_footer td {
padding: 0;
-webkit-border-radius: 6px;
}
#template_footer #credit {
border:0;
color: <?php echo esc_attr( $base_lighter_40 ); ?>;
font-family: Arial;
font-size:12px;
line-height:125%;
text-align:center;
padding: 0 48px 48px 48px;
}