1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<?php /** * Email Header * * @author WooThemes * @package WooCommerce/Templates/Emails * @version 2.0.0 */
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Load colours $bg = get_option( 'woocommerce_email_background_color' ); $body = get_option( 'woocommerce_email_body_background_color' ); $base = get_option( 'woocommerce_email_base_color' ); $base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); $text = get_option( 'woocommerce_email_text_color' );
$bg_darker_10 = wc_hex_darker( $bg, 10 ); $base_lighter_20 = wc_hex_lighter( $base, 20 ); $text_lighter_20 = wc_hex_lighter( $text, 20 );
// 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. !important; is a gmail hack to prevent styles being stripped if it doesn't like something. $wrapper = " background-color: " . esc_attr( $bg ) . "; width:100%; -webkit-text-size-adjust:none !important; margin:0; padding: 70px 0 70px 0; "; $template_container = " box-shadow:0 0 0 3px rgba(0,0,0,0.025) !important; border-radius:6px !important; background-color: " . esc_attr( $body ) . "; border: 1px solid $bg_darker_10; border-radius:6px !important; "; $template_header = " background-color: " . esc_attr( $base ) ."; color: $base_text; border-top-left-radius:6px !important; border-top-right-radius:6px !important; border-bottom: 0; font-family:Arial; font-weight:bold; line-height:100%; vertical-align:middle; "; $body_content = " background-color: " . esc_attr( $body ) . "; border-radius:6px !important; "; $body_content_inner = " color: $text_lighter_20; font-family:Arial; font-size:14px; line-height:150%; text-align:left; "; $header_content_h1 = " color: " . esc_attr( $base_text ) . "; margin:0; padding: 28px 24px; text-shadow: 0 1px 0 $base_lighter_20; display:block; font-family:Arial; font-size:30px; font-weight:bold; text-align:left; line-height: 150%; "; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title><?php echo get_bloginfo( 'name' ); ?></title> </head> <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> <div style="<?php echo $wrapper; ?>"> <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> <tr> <td align="center" valign="top"> <div id="template_header_image"> <?php if ( $img = get_option( 'woocommerce_email_header_image' ) ) { echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>'; } ?> </div> <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>"> <tr> <td align="center" valign="top"> <!-- Header --> <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header" style="<?php echo $template_header; ?>" bgcolor="<?php echo $base; ?>"> <tr> <td> <h1 style="<?php echo $header_content_h1; ?>"><?php echo $email_heading; ?></h1>
</td> </tr> </table> <!-- End Header --> </td> </tr> <tr> <td align="center" valign="top"> <!-- Body --> <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_body"> <tr> <td valign="top" style="<?php echo $body_content; ?>"> <!-- Content --> <table border="0" cellpadding="20" cellspacing="0" width="100%"> <tr> <td valign="top"> <div style="<?php echo $body_content_inner; ?>">
|