diff options
| author | florian <noreply@maennchen1.de> | 2018-08-10 07:40:47 +0000 |
|---|---|---|
| committer | florian <noreply@maennchen1.de> | 2018-08-10 07:40:47 +0000 |
| commit | 6025e7638c2e7cb385a6feae0893c64a014a2d06 (patch) | |
| tree | a8297f6ab1a53eac1e943d2ccf082d85f535d891 /views/mailtemplates/html/logo.phtml | |
| parent | 43bbaa69a22b8b8e9facca916da62010fea06eaa (diff) | |
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7094 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mailtemplates/html/logo.phtml')
| -rw-r--r-- | views/mailtemplates/html/logo.phtml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/views/mailtemplates/html/logo.phtml b/views/mailtemplates/html/logo.phtml new file mode 100644 index 0000000..a080084 --- /dev/null +++ b/views/mailtemplates/html/logo.phtml @@ -0,0 +1,33 @@ +<style>
+ .email-logo { padding-bottom: 10px; }
+ .email-logo-watermark { position:absolute; top:10%; left:0; right:0; display:flex; justify-content:center; align-items:center; }
+</style>
+
+<?php
+ if($this->get_option('wpsg_email_logo_activated'))
+ {
+
+ $logoWatermark = $this->get_option('wpsg_email_logo_watermark') ? "email-logo-watermark" : "";
+
+ $logoTransparency = str_replace("#", "", get_option('wpsg_email_logo_transparency'));
+ if($logoTransparency !== "100") $logoTransparency = str_replace(array("0", "00"), "", $logoTransparency);
+ if($logoTransparency !== "100") $logoTransparency = "0." . $logoTransparency;
+
+ $logoAlignment = $this->get_option('wpsg_email_logo_alignment');
+ $logoPath = WPSG_PATH_CONTENT . 'uploads/wpsg/wpsg_mailconf/wpsg_email_logo.jpg';
+
+ if(file_exists($logoPath))
+ {
+ $logoType = pathinfo($logoPath);
+ $logoData = file_get_contents($logoPath);
+ $logoBase64 = 'data:image/' . $logoType . ';base64,' . base64_encode($logoData);
+ }
+
+ }
+?>
+
+<?php if(file_exists($logoPath) && $this->get_option('wpsg_email_logo_activated')) { ?>
+ <?php echo "<div class='email-logo $logoWatermark' style='text-align:$logoAlignment; opacity:$logoTransparency;'>" ?>
+ <?php echo "<img alt='Emaillogo' class='email-logo-$logoAlignment' src='$logoBase64'>"; ?>
+ <?php echo "</div>"; ?>
+<?php } ?>
|
