Skip to content

Commit

Permalink
v 2.52.0
Browse files Browse the repository at this point in the history
Base Email v 0.2.0 :
- Hook for email styles and logo.
- Hook for default email recipient.
  • Loading branch information
Darklg committed Jul 24, 2023
1 parent 1e08934 commit 5bb39a4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions inc/WPUBaseEmail/WPUBaseEmail.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
namespace wpubaseemail_0_1_0;
namespace wpubaseemail_0_2_0;

/*
Class Name: WPU Base Email
Description: A class to handle native Email in WordPress admin
Version: 0.1.0
Version: 0.2.0
Class URI: https://github.com/WordPressUtilities/wpubaseplugin
Author: Darklg
Author URI: https://darklg.me/
Expand Down
16 changes: 13 additions & 3 deletions inc/WPUBaseEmail/templates/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
$email_text = 'Hello World';
}


$email_logo = apply_filters('wpubaseemail__template__email_logo', $email_logo);
$body_background_color = apply_filters('wpubaseemail__template__body_background_color', '#F0F0F0');
$main_background_color = apply_filters('wpubaseemail__template__main_background_color', '#FFFFFF');
$main_text_color = apply_filters('wpubaseemail__template__main_text_color', '#000000');
$main_font_size = apply_filters('wpubaseemail__template__main_font_size', 16);
$logo_width = apply_filters('wpubaseemail__template__logo_width', 100);
$divider_color = apply_filters('wpubaseemail__template__divider_color', '#F0F0F0');
$font_family = apply_filters('wpubaseemail__template__font_family', 'arial, helvetica, sans-serif');

?><!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title></title><!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style type="text/css">#outlook a { padding:0; }
body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
Expand All @@ -34,6 +44,6 @@
}</style><style media="screen and (min-width:480px)">.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }</style><style type="text/css">@media only screen and (max-width:480px) {
table.mj-full-width-mobile { width: 100% !important; }
td.mj-full-width-mobile { width: auto !important; }
}</style></head><body style="word-spacing:normal;background-color:#F0F0F0;"><div style="background-color:#F0F0F0;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:100px;"><img height="auto" src="<?php echo $email_logo; ?>" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="100"></td></tr></tbody></table></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><p style="border-top:solid 1px #F0F0F0;font-size:1px;margin:0px auto;width:100%;"></p><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #F0F0F0;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" ><tr><td style="height:0;line-height:0;"> &nbsp;
</td></tr></table><![endif]--></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:arial, helvetica, sans-serif;font-size:16px;line-height:1;text-align:left;color:#000000;"><?php echo $email_text; ?></div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><p style="border-top:solid 1px #F0F0F0;font-size:1px;margin:0px auto;width:100%;"></p><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #F0F0F0;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" ><tr><td style="height:0;line-height:0;"> &nbsp;
</td></tr></table><![endif]--></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:arial, helvetica, sans-serif;font-size:12px;line-height:1;text-align:center;color:#000000;"><a class="link-nostyle" href="<?php echo $footer_link; ?>" style="color: inherit;"><?php echo $footer_text; ?></a></div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
}</style></head><body style="word-spacing:normal;background-color:<?php echo $body_background_color; ?>;"><div style="background-color:<?php echo $body_background_color; ?>;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="<?php echo $main_background_color; ?>" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:<?php echo $main_background_color; ?>;background-color:<?php echo $main_background_color; ?>;margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:<?php echo $main_background_color; ?>;background-color:<?php echo $main_background_color; ?>;width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:<?php echo $logo_width; ?>px;"><img height="auto" src="<?php echo $email_logo; ?>" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="<?php echo $logo_width; ?>"></td></tr></tbody></table></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><p style="border-top:solid 1px <?php echo $divider_color; ?>;font-size:1px;margin:0px auto;width:100%;"></p><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px <?php echo $divider_color; ?>;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" ><tr><td style="height:0;line-height:0;"> &nbsp;
</td></tr></table><![endif]--></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:<?php echo $font_family; ?>;font-size:<?php echo $main_font_size; ?>px;line-height:1.3;text-align:left;color:<?php echo $main_text_color; ?>;"><?php echo $email_text; ?></div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><p style="border-top:solid 1px <?php echo $divider_color; ?>;font-size:1px;margin:0px auto;width:100%;"></p><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px <?php echo $divider_color; ?>;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" ><tr><td style="height:0;line-height:0;"> &nbsp;
</td></tr></table><![endif]--></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:<?php echo $font_family; ?>;font-size:12px;line-height:1.3;text-align:center;color:<?php echo $main_text_color; ?>;"><a class="link-nostyle" href="<?php echo $footer_link; ?>" style="color: inherit;"><?php echo $footer_text; ?></a></div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
6 changes: 3 additions & 3 deletions wpubaseplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: https://github.com/WordPressUtilities/wpubaseplugin
Update URI: https://github.com/WordPressUtilities/wpubaseplugin
Description: A framework for a WordPress plugin
Version: 2.51.0
Version: 2.52.0
Author: Darklg
Author URI: https://darklg.me/
Text Domain: wpubaseplugin
Expand All @@ -18,7 +18,7 @@

class WPUBasePlugin {

public $version = '2.51.0';
public $version = '2.52.0';

private $utilities_classes = array(
'messages' => array(
Expand Down Expand Up @@ -50,7 +50,7 @@ class WPUBasePlugin {
'name' => 'WPUBaseUpdate'
),
'email' => array(
'namespace' => 'wpubaseemail_0_1_0',
'namespace' => 'wpubaseemail_0_2_0',
'name' => 'WPUBaseEmail'
)
);
Expand Down

0 comments on commit 5bb39a4

Please sign in to comment.