PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / templates / emails / email-styles.php

email-styles.php in Property Hive 2.3.1, at templates/emails/email-styles.php

140 lines 4.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Email Styles
4 *
5 * This template can be overridden by copying it to yourtheme/propertyhive/emails/email-styles.php.
6 *
7 * @author PropertyHive
8 * @package PropertyHive/Templates/Emails
9 * @version 1.0.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
14 // Load colours
15 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
16 $bg = get_option( 'propertyhive_email_background_color' );
17 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
18 $body = get_option( 'propertyhive_email_body_background_color' );
19 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
20 $text = get_option( 'propertyhive_email_text_color' );
21
22 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
23 $bg_darker_10 = ph_hex_darker( $bg, 10 );
24 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
25 $body_darker_10 = ph_hex_darker( $body, 10 );
26 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
27 $text_lighter_20 = ph_hex_lighter( $text, 20 );
28
29 // !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
30 ?>
31 body {
32 background-color: <?php echo esc_attr( $bg ); ?>;
33 }
34 #wrapper {
35 background-color: <?php echo esc_attr( $bg ); ?>;
36 margin: 0;
37 padding: 30px 0 30px 0;
38 -webkit-text-size-adjust: none !important;
39 width: 100%;
40 }
41
42 #template_container {
43 background-color: <?php echo esc_attr( $body ); ?>;
44 }
45
46 #body_content {
47 background-color: <?php echo esc_attr( $body ); ?>;
48 }
49
50 #body_content table td {
51 padding: 34px;
52 vertical-align: top;
53 }
54
55 #body_content table td th,
56 #body_content table td td {
57 padding:7px;
58 }
59
60 #body_content p {
61 margin: 0 0 16px;
62 }
63
64 #body_content_inner {
65 color: <?php echo esc_attr( $text ); ?>;
66 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
67 font-size: 14px;
68 line-height: 150%;
69 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
70 }
71
72 .td {
73 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
74 border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
75 }
76
77 .text {
78 color: <?php echo esc_attr( $text ); ?>;
79 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
80 }
81
82 .link {
83 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
84 }
85
86 #header_wrapper {
87 padding: 36px 48px;
88 display: block;
89 }
90
91 h1 {
92 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
93 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
94 font-size: 30px;
95 font-weight: 300;
96 line-height: 150%;
97 margin: 0;
98 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
99 -webkit-font-smoothing: antialiased;
100 }
101
102 h2 {
103 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
104 display: block;
105 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
106 font-size: 18px;
107 font-weight: bold;
108 line-height: 130%;
109 margin: 0 0 8px;
110 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
111 }
112
113 h3 {
114 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
115 display: block;
116 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
117 font-size: 16px;
118 font-weight: bold;
119 line-height: 130%;
120 margin: 0 0 8px;
121 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
122 }
123
124 a {
125 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
126 font-weight: normal;
127 text-decoration: underline;
128 }
129
130 img {
131 border: none;
132 display: inline;
133 font-size: 14px;
134 font-weight: bold;
135 height: auto;
136 line-height: 100%;
137 outline: none;
138 text-decoration: none;
139 text-transform: capitalize;
140 }