Version Description
- Security Issue Fixed
- Few Urgent Bugs Fixed
Download this release
Release Info
Developer | contact-banker |
Plugin | WP Mail Bank: WordPress SMTP Plugin & Email Logs |
Version | 1.45 |
Comparing to | |
See all releases |
Code changes from version 1.44 to 1.45
- lib/add_mail_class_file.php +22 -22
- readme.txt +8 -3
- views/automatic-plugin-update.php +9 -8
- views/mail_header.php +7 -7
- views/mail_settings.php +37 -25
- views/test_email.php +29 -20
- views/wp_system_status.php +8 -8
- wp-mail-bank.php +295 -265
lib/add_mail_class_file.php
CHANGED
@@ -37,25 +37,25 @@ else
|
|
37 |
if(isset($_REQUEST["param"]))
|
38 |
{
|
39 |
global $wpdb;
|
40 |
-
if($_REQUEST["param"] == "add_mail_detail")
|
41 |
{
|
42 |
$insert = new save_data();
|
43 |
$email_setup = array();
|
44 |
-
$email_setup["from_name"] = esc_html(html_entity_decode(base64_decode($_REQUEST["from_name"])));
|
45 |
-
$email_setup["from_email"] = esc_attr($_REQUEST["ux_email_from_email"]);
|
46 |
-
$email_setup["mailer_type"] = intval($_REQUEST["ux_rdl_ends"]);
|
47 |
$email_setup["return_path"] = isset($_REQUEST["ux_chk_return_path"]) ? intval($_REQUEST["ux_chk_return_path"]) : 0;
|
48 |
-
$email_setup["return_email"] = esc_attr($_REQUEST["ux_return_email"]);
|
49 |
-
$email_setup["word_wrap"] = intval($_REQUEST["ux_word_wrap"]);
|
50 |
-
$email_setup["smtp_host"] = esc_attr($_REQUEST["ux_smtp_host"]);
|
51 |
-
$email_setup["smtp_port"] = esc_attr($_REQUEST["ux_smtp_port"]);
|
52 |
-
$email_setup["encryption"] = intval($_REQUEST["ux_rdl_encrption"]);
|
53 |
-
$email_setup["smtp_keep_alive"] = intval($_REQUEST["ux_rdl_smtp_alive"]);
|
54 |
-
$email_setup["authentication"] = intval($_REQUEST["ux_rdl_authentication_bank"]);
|
55 |
-
$email_setup["smtp_username"] = esc_attr($_REQUEST["ux_txt_username"]);
|
56 |
-
$email_setup["smtp_password"] = htmlspecialchars_decode(esc_attr($_REQUEST["password"]));
|
57 |
-
$ux_chk_email_from_name = isset($_REQUEST["ux_chk_email_from_name"]) ? $_REQUEST["ux_chk_email_from_name"] :"0";
|
58 |
-
$ux_chk_from_email = isset($_REQUEST["ux_chk_from_email"]) ? $_REQUEST["ux_chk_from_email"] :"0";
|
59 |
$count_direction = $wpdb->get_var
|
60 |
(
|
61 |
"SELECT count(id) FROM " .wp_mail_bank()
|
@@ -75,7 +75,7 @@ else
|
|
75 |
die();
|
76 |
|
77 |
}
|
78 |
-
elseif($_REQUEST["param"] == "send_mail")
|
79 |
{
|
80 |
global $phpmailer;
|
81 |
$logs = array();
|
@@ -88,9 +88,9 @@ else
|
|
88 |
$phpmailer->SMTPDebug = true;
|
89 |
ob_start();
|
90 |
|
91 |
-
$to = esc_attr($_REQUEST["ux_email_to"]);
|
92 |
-
$subject=esc_attr($_REQUEST["ux_email_subject"]);
|
93 |
-
$message=stripslashes(
|
94 |
$result = wp_mail($to, $subject, $message);
|
95 |
if($phpmailer->Mailer == "smtp")
|
96 |
{
|
@@ -102,11 +102,11 @@ else
|
|
102 |
}
|
103 |
die();
|
104 |
}
|
105 |
-
elseif($_REQUEST["param"] == "mail_bank_plugin_updates")
|
106 |
{
|
107 |
-
if(wp_verify_nonce(
|
108 |
{
|
109 |
-
$plugin_update = esc_attr($_REQUEST["mail_bank_updates"]);
|
110 |
update_option("mail-bank-automatic-update",$plugin_update);
|
111 |
die();
|
112 |
}
|
37 |
if(isset($_REQUEST["param"]))
|
38 |
{
|
39 |
global $wpdb;
|
40 |
+
if(esc_attr($_REQUEST["param"]) == "add_mail_detail")
|
41 |
{
|
42 |
$insert = new save_data();
|
43 |
$email_setup = array();
|
44 |
+
$email_setup["from_name"] = isset($_REQUEST["from_name"]) ? esc_html(html_entity_decode(base64_decode($_REQUEST["from_name"]))) : "";
|
45 |
+
$email_setup["from_email"] = isset($_REQUEST["ux_email_from_email"]) ? esc_attr($_REQUEST["ux_email_from_email"]) : "";
|
46 |
+
$email_setup["mailer_type"] = isset($_REQUEST["ux_rdl_ends"]) ? intval($_REQUEST["ux_rdl_ends"]) : 0;
|
47 |
$email_setup["return_path"] = isset($_REQUEST["ux_chk_return_path"]) ? intval($_REQUEST["ux_chk_return_path"]) : 0;
|
48 |
+
$email_setup["return_email"] = isset($_REQUEST["ux_return_email"]) ? esc_attr($_REQUEST["ux_return_email"]) : "";
|
49 |
+
$email_setup["word_wrap"] = isset($_REQUEST["ux_word_wrap"]) ? intval($_REQUEST["ux_word_wrap"]) : 0;
|
50 |
+
$email_setup["smtp_host"] = isset($_REQUEST["ux_smtp_host"]) ? esc_attr($_REQUEST["ux_smtp_host"]) : "";
|
51 |
+
$email_setup["smtp_port"] = isset($_REQUEST["ux_smtp_port"]) ? esc_attr($_REQUEST["ux_smtp_port"]) : "";
|
52 |
+
$email_setup["encryption"] = isset($_REQUEST["ux_rdl_encrption"]) ? intval($_REQUEST["ux_rdl_encrption"]) : 0;
|
53 |
+
$email_setup["smtp_keep_alive"] = isset($_REQUEST["ux_rdl_smtp_alive"]) ? intval($_REQUEST["ux_rdl_smtp_alive"]) : 0;
|
54 |
+
$email_setup["authentication"] = isset($_REQUEST["ux_rdl_authentication_bank"]) ? intval($_REQUEST["ux_rdl_authentication_bank"]) : 0;
|
55 |
+
$email_setup["smtp_username"] = isset($_REQUEST["ux_txt_username"]) ? esc_attr($_REQUEST["ux_txt_username"]) : "";
|
56 |
+
$email_setup["smtp_password"] = isset($_REQUEST["password"]) ? htmlspecialchars_decode(esc_attr($_REQUEST["password"])) : "";
|
57 |
+
$ux_chk_email_from_name = isset($_REQUEST["ux_chk_email_from_name"]) ? esc_attr($_REQUEST["ux_chk_email_from_name"]) :"0";
|
58 |
+
$ux_chk_from_email = isset($_REQUEST["ux_chk_from_email"]) ? esc_attr($_REQUEST["ux_chk_from_email"]) :"0";
|
59 |
$count_direction = $wpdb->get_var
|
60 |
(
|
61 |
"SELECT count(id) FROM " .wp_mail_bank()
|
75 |
die();
|
76 |
|
77 |
}
|
78 |
+
elseif(esc_attr($_REQUEST["param"]) == "send_mail")
|
79 |
{
|
80 |
global $phpmailer;
|
81 |
$logs = array();
|
88 |
$phpmailer->SMTPDebug = true;
|
89 |
ob_start();
|
90 |
|
91 |
+
$to = isset($_REQUEST["ux_email_to"]) ? esc_attr($_REQUEST["ux_email_to"]) : "";
|
92 |
+
$subject = isset($_REQUEST["ux_email_subject"]) ? esc_attr($_REQUEST["ux_email_subject"]) : "";
|
93 |
+
$message = isset($_REQUEST["message"]) ? stripslashes($_REQUEST["message"]) : "";
|
94 |
$result = wp_mail($to, $subject, $message);
|
95 |
if($phpmailer->Mailer == "smtp")
|
96 |
{
|
102 |
}
|
103 |
die();
|
104 |
}
|
105 |
+
elseif(esc_attr($_REQUEST["param"]) == "mail_bank_plugin_updates")
|
106 |
{
|
107 |
+
if(wp_verify_nonce(esc_attr($_REQUEST["_wpnonce"]), "update_plugin_nonce"))
|
108 |
{
|
109 |
+
$plugin_update = isset($_REQUEST["mail_bank_updates"]) ? esc_attr($_REQUEST["mail_bank_updates"]) : "";
|
110 |
update_option("mail-bank-automatic-update",$plugin_update);
|
111 |
die();
|
112 |
}
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== WP Mail Bank - Best PHPMailer & SMTP Mailer ===
|
2 |
Contributors: contact-banker, Gallery-Bank
|
3 |
-
Tags:
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 4.5.3
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
WP Mail Bank reconfigures the PHP Mailer and make it more enhanced with advanced SMTP settings options.
|
9 |
|
@@ -222,9 +222,14 @@ If any problem occurs, please contact us at [support@tech-banker.com](mailto:sup
|
|
222 |
|
223 |
== Changelog ==
|
224 |
|
|
|
|
|
|
|
|
|
|
|
225 |
= 1.44 =
|
226 |
|
227 |
-
* Compatibility with 4.5
|
228 |
* Few Urgent Bugs Fixed
|
229 |
|
230 |
= 1.43 =
|
1 |
=== WP Mail Bank - Best PHPMailer & SMTP Mailer ===
|
2 |
Contributors: contact-banker, Gallery-Bank
|
3 |
+
Tags: email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, sendmail, smtp, ssl, tls, wordpress smtp, wp smtp, wp-phpmailer, wp_mail, wp mail, mailer, mail bank
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 4.5.3
|
6 |
+
Stable tag: 1.45
|
7 |
|
8 |
WP Mail Bank reconfigures the PHP Mailer and make it more enhanced with advanced SMTP settings options.
|
9 |
|
222 |
|
223 |
== Changelog ==
|
224 |
|
225 |
+
= 1.45 =
|
226 |
+
|
227 |
+
* Security Issue Fixed
|
228 |
+
* Few Urgent Bugs Fixed
|
229 |
+
|
230 |
= 1.44 =
|
231 |
|
232 |
+
* Compatibility with 4.5.3
|
233 |
* Few Urgent Bugs Fixed
|
234 |
|
235 |
= 1.43 =
|
views/automatic-plugin-update.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
if (!is_user_logged_in())
|
3 |
{
|
4 |
return;
|
@@ -58,17 +58,18 @@ else
|
|
58 |
</div>
|
59 |
</form>
|
60 |
<script type="text/javascript">
|
61 |
-
|
62 |
-
function mail_bank_autoupdate(control)
|
63 |
{
|
64 |
-
|
65 |
-
jQuery.post(ajaxurl, "mail_bank_updates="+mail_bank_updates+"¶m=mail_bank_plugin_updates&action=add_mail_library&_wpnonce=<?php echo $plugin_update_nonce ;?>", function(data)
|
66 |
{
|
67 |
-
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
-
|
70 |
</script>
|
71 |
<?php
|
72 |
}
|
73 |
}
|
74 |
-
?>
|
1 |
+
<?php
|
2 |
if (!is_user_logged_in())
|
3 |
{
|
4 |
return;
|
58 |
</div>
|
59 |
</form>
|
60 |
<script type="text/javascript">
|
61 |
+
if(typeof(mail_bank_autoupdate) != "function")
|
|
|
62 |
{
|
63 |
+
function mail_bank_autoupdate(control)
|
|
|
64 |
{
|
65 |
+
var mail_bank_updates = jQuery(control).val();
|
66 |
+
jQuery.post(ajaxurl, "mail_bank_updates="+mail_bank_updates+"¶m=mail_bank_plugin_updates&action=add_mail_library&_wpnonce=<?php echo $plugin_update_nonce ;?>", function(data)
|
67 |
+
{
|
68 |
+
});
|
69 |
+
}
|
70 |
}
|
|
|
71 |
</script>
|
72 |
<?php
|
73 |
}
|
74 |
}
|
75 |
+
?>
|
views/mail_header.php
CHANGED
@@ -27,12 +27,12 @@ else
|
|
27 |
<a class="nav-tab" id="other_services" href="admin.php?page=other_services"><?php _e("Our Other Services", mail_bank);?></a>
|
28 |
</h2>
|
29 |
<?php
|
30 |
-
if($
|
31 |
{
|
32 |
?>
|
33 |
<div class="custom-message green" style="display: block;margin-top:30px;max-width:965px;">
|
34 |
<div style="padding: 4px 0;">
|
35 |
-
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you don't find any features you were looking for in this Plugin,
|
36 |
please write us <a target="_self" href="admin.php?page=mail_feature_requests">here</a> and we shall try to implement this for you as soon as possible! We are looking forward for your valuable <a target="_self" href="admin.php?page=mail_feature_requests">Feedback</a></p>
|
37 |
</div>
|
38 |
</div>
|
@@ -40,13 +40,13 @@ else
|
|
40 |
}
|
41 |
?>
|
42 |
<script>
|
43 |
-
|
44 |
jQuery(document).ready(function()
|
45 |
{
|
46 |
-
jQuery(".nav-tab-wrapper > a#<?php echo $
|
47 |
});
|
48 |
-
|
49 |
</script>
|
50 |
-
<?php
|
51 |
}
|
52 |
-
?>
|
27 |
<a class="nav-tab" id="other_services" href="admin.php?page=other_services"><?php _e("Our Other Services", mail_bank);?></a>
|
28 |
</h2>
|
29 |
<?php
|
30 |
+
if(isset($_GET["page"]) ? esc_attr($_GET["page"]) : "" != "mail_feature_requests")
|
31 |
{
|
32 |
?>
|
33 |
<div class="custom-message green" style="display: block;margin-top:30px;max-width:965px;">
|
34 |
<div style="padding: 4px 0;">
|
35 |
+
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you don't find any features you were looking for in this Plugin,
|
36 |
please write us <a target="_self" href="admin.php?page=mail_feature_requests">here</a> and we shall try to implement this for you as soon as possible! We are looking forward for your valuable <a target="_self" href="admin.php?page=mail_feature_requests">Feedback</a></p>
|
37 |
</div>
|
38 |
</div>
|
40 |
}
|
41 |
?>
|
42 |
<script>
|
43 |
+
|
44 |
jQuery(document).ready(function()
|
45 |
{
|
46 |
+
jQuery(".nav-tab-wrapper > a#<?php echo isset($_GET["page"]) ? esc_attr($_GET["page"]) : "";?>").addClass("nav-tab-active");
|
47 |
});
|
48 |
+
|
49 |
</script>
|
50 |
+
<?php
|
51 |
}
|
52 |
+
?>
|
views/mail_settings.php
CHANGED
@@ -400,46 +400,58 @@ jQuery("#ux_frm_email").validate
|
|
400 |
}
|
401 |
});
|
402 |
|
403 |
-
|
404 |
{
|
405 |
-
|
|
|
|
|
|
|
406 |
}
|
407 |
|
408 |
-
|
409 |
{
|
410 |
-
|
411 |
-
if(value == false)
|
412 |
-
{
|
413 |
-
jQuery("#ux_smtp_host").css("display","block");
|
414 |
-
}
|
415 |
-
else
|
416 |
{
|
417 |
-
jQuery("#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
}
|
419 |
}
|
420 |
|
421 |
-
|
422 |
{
|
423 |
-
|
424 |
{
|
425 |
-
jQuery("#
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
|
|
|
|
|
|
430 |
}
|
431 |
}
|
432 |
|
433 |
-
|
434 |
{
|
435 |
-
|
436 |
-
if(value == false)
|
437 |
-
{
|
438 |
-
jQuery("#ux_smtp").css("display","none");
|
439 |
-
}
|
440 |
-
else
|
441 |
{
|
442 |
-
jQuery("#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
}
|
444 |
}
|
445 |
</script>
|
400 |
}
|
401 |
});
|
402 |
|
403 |
+
if(typeof(message_close) != "function")
|
404 |
{
|
405 |
+
function message_close()
|
406 |
+
{
|
407 |
+
jQuery("#message").css("display", "none");
|
408 |
+
}
|
409 |
}
|
410 |
|
411 |
+
if(typeof(backup_rdl) != "function")
|
412 |
{
|
413 |
+
function backup_rdl ()
|
|
|
|
|
|
|
|
|
|
|
414 |
{
|
415 |
+
var value = jQuery("#ux_rdl_on").prop("checked");
|
416 |
+
if(value == false)
|
417 |
+
{
|
418 |
+
jQuery("#ux_smtp_host").css("display","block");
|
419 |
+
}
|
420 |
+
else
|
421 |
+
{
|
422 |
+
jQuery("#ux_smtp_host").css("display","none");
|
423 |
+
}
|
424 |
}
|
425 |
}
|
426 |
|
427 |
+
if(typeof(show_return_path) != "function")
|
428 |
{
|
429 |
+
function show_return_path()
|
430 |
{
|
431 |
+
if(jQuery("#ux_chk_return_path").prop("checked") == "0")
|
432 |
+
{
|
433 |
+
jQuery("#return_path").css("display","block");
|
434 |
+
}
|
435 |
+
else
|
436 |
+
{
|
437 |
+
jQuery("#return_path").css("display","none");
|
438 |
+
}
|
439 |
}
|
440 |
}
|
441 |
|
442 |
+
if(typeof(smtp_username) != "function")
|
443 |
{
|
444 |
+
function smtp_username ()
|
|
|
|
|
|
|
|
|
|
|
445 |
{
|
446 |
+
var value = jQuery("#ux_rdl_authentication_use").prop("checked");
|
447 |
+
if(value == false)
|
448 |
+
{
|
449 |
+
jQuery("#ux_smtp").css("display","none");
|
450 |
+
}
|
451 |
+
else
|
452 |
+
{
|
453 |
+
jQuery("#ux_smtp").css("display","block");
|
454 |
+
}
|
455 |
}
|
456 |
}
|
457 |
</script>
|
views/test_email.php
CHANGED
@@ -53,9 +53,9 @@ else
|
|
53 |
This is a Test Email from WP Mail Bank.
|
54 |
Thanks for using it!
|
55 |
Best Regards
|
56 |
-
<strong>WP Mail Bank</strong>";
|
57 |
-
wp_editor( $distribution, $name ="uxEmailTemplate" ,array("media_buttons" => false,
|
58 |
-
"textarea_rows" => 8, "tabindex" => 4,"tinymce" =>false ));
|
59 |
?>
|
60 |
<p class="wpib-desc-italic"><?php _e("You can specify the message of the email you want to send for testing.", mail_bank); ?></p>
|
61 |
</div>
|
@@ -67,7 +67,7 @@ else
|
|
67 |
</div>
|
68 |
</div>
|
69 |
</div>
|
70 |
-
|
71 |
</div>
|
72 |
</div>
|
73 |
</div>
|
@@ -113,16 +113,16 @@ jQuery(document).ready(function()
|
|
113 |
jQuery("label ").css("margin-left","6px");
|
114 |
});
|
115 |
jQuery("#ux_frm_test_email").validate
|
116 |
-
({
|
117 |
rules:
|
118 |
-
{
|
119 |
ux_email_to:
|
120 |
-
{
|
121 |
required: true,
|
122 |
email: true
|
123 |
},
|
124 |
ux_email_subject:
|
125 |
-
{
|
126 |
required: true
|
127 |
}
|
128 |
},
|
@@ -133,7 +133,7 @@ jQuery("#ux_frm_test_email").validate
|
|
133 |
error.insertAfter(ctrl);
|
134 |
jQuery(".error_field").css("float","left");
|
135 |
jQuery(".error_field").css("position","static");
|
136 |
-
|
137 |
},
|
138 |
submitHandler: function(form)
|
139 |
{
|
@@ -158,22 +158,31 @@ jQuery("#ux_frm_test_email").validate
|
|
158 |
jQuery("#console_log_div").css("display","block");
|
159 |
jQuery("#result_div").css("display","none");
|
160 |
jQuery("#ux_console_log").html(data);
|
161 |
-
}
|
162 |
});
|
163 |
}
|
164 |
});jQuery("#return_path").css("display","block");
|
165 |
-
|
166 |
{
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
169 |
}
|
170 |
-
|
171 |
{
|
172 |
-
|
|
|
|
|
|
|
173 |
}
|
174 |
-
|
175 |
-
{
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
178 |
}
|
179 |
-
</script>
|
53 |
This is a Test Email from WP Mail Bank.
|
54 |
Thanks for using it!
|
55 |
Best Regards
|
56 |
+
<strong>WP Mail Bank</strong>";
|
57 |
+
wp_editor( $distribution, $name ="uxEmailTemplate" ,array("media_buttons" => false,
|
58 |
+
"textarea_rows" => 8, "tabindex" => 4,"tinymce" =>false ));
|
59 |
?>
|
60 |
<p class="wpib-desc-italic"><?php _e("You can specify the message of the email you want to send for testing.", mail_bank); ?></p>
|
61 |
</div>
|
67 |
</div>
|
68 |
</div>
|
69 |
</div>
|
70 |
+
|
71 |
</div>
|
72 |
</div>
|
73 |
</div>
|
113 |
jQuery("label ").css("margin-left","6px");
|
114 |
});
|
115 |
jQuery("#ux_frm_test_email").validate
|
116 |
+
({
|
117 |
rules:
|
118 |
+
{
|
119 |
ux_email_to:
|
120 |
+
{
|
121 |
required: true,
|
122 |
email: true
|
123 |
},
|
124 |
ux_email_subject:
|
125 |
+
{
|
126 |
required: true
|
127 |
}
|
128 |
},
|
133 |
error.insertAfter(ctrl);
|
134 |
jQuery(".error_field").css("float","left");
|
135 |
jQuery(".error_field").css("position","static");
|
136 |
+
|
137 |
},
|
138 |
submitHandler: function(form)
|
139 |
{
|
158 |
jQuery("#console_log_div").css("display","block");
|
159 |
jQuery("#result_div").css("display","none");
|
160 |
jQuery("#ux_console_log").html(data);
|
161 |
+
}
|
162 |
});
|
163 |
}
|
164 |
});jQuery("#return_path").css("display","block");
|
165 |
+
if(typeof(console_log) != "function")
|
166 |
{
|
167 |
+
function console_log()
|
168 |
+
{
|
169 |
+
jQuery("#ux_test_mail").css("display","none");
|
170 |
+
jQuery("#ux_mail_console").css("display","block");
|
171 |
+
}
|
172 |
}
|
173 |
+
if(typeof(back_settings) != "function")
|
174 |
{
|
175 |
+
function back_settings()
|
176 |
+
{
|
177 |
+
window.location.href = "admin.php?page=smtp_mail";
|
178 |
+
}
|
179 |
}
|
180 |
+
if(typeof(send_test_email) != "function")
|
181 |
+
{
|
182 |
+
function send_test_email()
|
183 |
+
{
|
184 |
+
jQuery("#ux_test_mail").css("display","block");
|
185 |
+
jQuery("#ux_mail_console").css("display","none");
|
186 |
+
}
|
187 |
}
|
188 |
+
</script>
|
views/wp_system_status.php
CHANGED
@@ -86,7 +86,7 @@ else
|
|
86 |
<label class="layout-control-label">MySQL Version :</label>
|
87 |
<div class="layout-controls wp_layout_control_mail_bank">
|
88 |
<span>
|
89 |
-
<?php
|
90 |
global $wpdb;
|
91 |
echo $wpdb->db_version();
|
92 |
?>
|
@@ -109,7 +109,7 @@ else
|
|
109 |
<label class="layout-control-label">PHP Post Max Size :</label>
|
110 |
<div class="layout-controls wp_layout_control_mail_bank">
|
111 |
<span>
|
112 |
-
<?php
|
113 |
echo ini_get("post_max_size");
|
114 |
?>
|
115 |
</span>
|
@@ -381,7 +381,7 @@ else
|
|
381 |
<div class="widget-layout-body">
|
382 |
<div class="layout-control-group">
|
383 |
<label class="layout-control-label">Theme Name :</label>
|
384 |
-
|
385 |
<div class="layout-controls wp_layout_control_mail_bank">
|
386 |
<span><?php echo $active_theme->Name; ?></span>
|
387 |
</div>
|
@@ -404,7 +404,7 @@ else
|
|
404 |
</div>
|
405 |
</div>
|
406 |
</div>
|
407 |
-
<?php
|
408 |
}
|
409 |
?>
|
410 |
</div>
|
@@ -430,7 +430,7 @@ else
|
|
430 |
}
|
431 |
return o;
|
432 |
};
|
433 |
-
|
434 |
jQuery("a.system-report").click(function () {
|
435 |
var report = "";
|
436 |
jQuery(".layout-span6 .widget-layout").each(function () {
|
@@ -468,11 +468,11 @@ else
|
|
468 |
jQuery(this).fadeOut();
|
469 |
jQuery("a.system-report").fadeIn();
|
470 |
})
|
471 |
-
jQuery(document).ready(function()
|
472 |
{
|
473 |
jQuery("#wp_system_status").addClass("nav-tab-active");
|
474 |
});
|
475 |
</script>
|
476 |
-
<?php
|
477 |
}
|
478 |
-
?>
|
86 |
<label class="layout-control-label">MySQL Version :</label>
|
87 |
<div class="layout-controls wp_layout_control_mail_bank">
|
88 |
<span>
|
89 |
+
<?php
|
90 |
global $wpdb;
|
91 |
echo $wpdb->db_version();
|
92 |
?>
|
109 |
<label class="layout-control-label">PHP Post Max Size :</label>
|
110 |
<div class="layout-controls wp_layout_control_mail_bank">
|
111 |
<span>
|
112 |
+
<?php
|
113 |
echo ini_get("post_max_size");
|
114 |
?>
|
115 |
</span>
|
381 |
<div class="widget-layout-body">
|
382 |
<div class="layout-control-group">
|
383 |
<label class="layout-control-label">Theme Name :</label>
|
384 |
+
|
385 |
<div class="layout-controls wp_layout_control_mail_bank">
|
386 |
<span><?php echo $active_theme->Name; ?></span>
|
387 |
</div>
|
404 |
</div>
|
405 |
</div>
|
406 |
</div>
|
407 |
+
<?php
|
408 |
}
|
409 |
?>
|
410 |
</div>
|
430 |
}
|
431 |
return o;
|
432 |
};
|
433 |
+
|
434 |
jQuery("a.system-report").click(function () {
|
435 |
var report = "";
|
436 |
jQuery(".layout-span6 .widget-layout").each(function () {
|
468 |
jQuery(this).fadeOut();
|
469 |
jQuery("a.system-report").fadeIn();
|
470 |
})
|
471 |
+
jQuery(document).ready(function()
|
472 |
{
|
473 |
jQuery("#wp_system_status").addClass("nav-tab-active");
|
474 |
});
|
475 |
</script>
|
476 |
+
<?php
|
477 |
}
|
478 |
+
?>
|
wp-mail-bank.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Wp Mail Bank
|
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: WP Mail Bank reconfigures the wp_mail() function and make it more enhanced.
|
6 |
Author: Tech Banker
|
7 |
-
Version: 1.
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
@@ -20,312 +20,338 @@ if (!defined("MAIL_FILE")) define("MAIL_FILE","wp-mail-bank/wp-mail-bank.php");
|
|
20 |
|
21 |
global $phpmailer;
|
22 |
|
23 |
-
|
24 |
-
function create_global_menus_for_mail_bank()
|
25 |
{
|
26 |
-
|
27 |
-
if(is_super_admin())
|
28 |
-
{
|
29 |
-
$role = "administrator";
|
30 |
-
}
|
31 |
-
else
|
32 |
{
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
-
include MAIL_BK_PLUGIN_DIR . "/lib/wp-include-menus.php";
|
38 |
}
|
|
|
39 |
///////////////////////////////////// Functions for Returing Table Names ////////////////////////////////////////
|
40 |
-
|
41 |
{
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
}
|
45 |
///////////////////////////////////// Call CSS & JS Scripts - Back End ////////////////////////////////////////
|
46 |
-
|
47 |
-
function backend_plugin_js_scripts_mail_bank()
|
48 |
-
{
|
49 |
-
wp_enqueue_script("jquery");
|
50 |
-
wp_enqueue_script("jquery.validate.min.js", plugins_url("/assets/js/jquery.validate.min.js",__FILE__));
|
51 |
-
}
|
52 |
-
|
53 |
-
function backend_plugin_css_scripts_mail_bank()
|
54 |
{
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
-
|
60 |
{
|
61 |
-
|
62 |
-
$data=$wpdb->get_row
|
63 |
-
(
|
64 |
-
"SELECT * FROM ".wp_mail_bank()
|
65 |
-
);
|
66 |
-
$mail_type = $data->mailer_type;
|
67 |
-
$phpmailer->Mailer = $data->mailer_type == 0 ? "smtp" : "mail";
|
68 |
-
$ux_chk_email_from_name = get_option("show_from_name_in_email");
|
69 |
-
if( $ux_chk_email_from_name == "" || $ux_chk_email_from_name == "1")
|
70 |
-
{
|
71 |
-
$phpmailer->FromName = stripslashes(htmlspecialchars_decode($data->from_name, ENT_QUOTES));
|
72 |
-
}
|
73 |
-
$ux_chk_from_email = get_option("show_from_email_in_email");
|
74 |
-
if( $ux_chk_from_email == "" || $ux_chk_from_email == "1")
|
75 |
{
|
76 |
-
|
|
|
77 |
}
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
$phpmailer
|
82 |
-
(
|
83 |
-
'ssl' => array
|
84 |
-
(
|
85 |
-
'verify_peer' => false,
|
86 |
-
'verify_peer_name' => false,
|
87 |
-
'allow_self_signed' => true
|
88 |
-
)
|
89 |
-
);
|
90 |
-
if($data->mailer_type == 0)
|
91 |
{
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
{
|
94 |
-
|
95 |
-
$phpmailer->SMTPSecure ="";
|
96 |
-
break;
|
97 |
-
case 1 :
|
98 |
-
$phpmailer->SMTPSecure ="ssl";
|
99 |
-
break;
|
100 |
-
case 2 :
|
101 |
-
$phpmailer->SMTPSecure ="tls";
|
102 |
-
break;
|
103 |
}
|
104 |
-
$
|
105 |
-
$
|
106 |
-
if($data->smtp_keep_alive == 1)
|
107 |
{
|
108 |
-
$phpmailer->
|
109 |
}
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
{
|
112 |
-
$
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
}
|
117 |
}
|
118 |
|
|
|
119 |
////////////////////////////////////// Class Files Action Functions START here /////////////////////////////////////////
|
120 |
if(isset($_REQUEST["action"]))
|
121 |
{
|
122 |
-
switch($_REQUEST["action"])
|
123 |
{
|
124 |
case "add_mail_library":
|
125 |
add_action( "admin_init", "add_mail_library");
|
126 |
-
|
127 |
{
|
128 |
-
|
129 |
-
if(is_super_admin())
|
130 |
-
{
|
131 |
-
$role = "administrator";
|
132 |
-
}
|
133 |
-
else
|
134 |
{
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
-
include MAIL_BK_PLUGIN_DIR . "/lib/add_mail_class_file.php";
|
140 |
}
|
141 |
break;
|
142 |
}
|
143 |
}
|
144 |
///////////////////////////////////// Call Languages for Multi-Lingual ////////////////////////////////////////
|
145 |
|
146 |
-
|
147 |
{
|
148 |
-
|
149 |
{
|
150 |
-
|
|
|
|
|
|
|
151 |
}
|
152 |
}
|
153 |
|
|
|
154 |
///////////////////////////////////// admin menu////////////////////////////////////////
|
155 |
|
156 |
-
|
157 |
{
|
158 |
-
|
159 |
-
if (is_user_logged_in())
|
160 |
{
|
161 |
-
|
162 |
-
|
163 |
-
$role = "administrator";
|
164 |
-
}
|
165 |
-
else
|
166 |
{
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
$
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
|
|
326 |
}
|
327 |
}
|
328 |
}
|
|
|
329 |
///////////////////////////////////// Call Install Script on Plugin Activation ////////////////////////////////////////
|
330 |
if(!function_exists("plugin_install_script_for_mail_bank"))
|
331 |
{
|
@@ -355,27 +381,31 @@ if(!function_exists("plugin_install_script_for_mail_bank"))
|
|
355 |
}
|
356 |
}
|
357 |
|
358 |
-
|
359 |
{
|
360 |
-
|
361 |
-
if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) )
|
362 |
{
|
363 |
-
|
364 |
-
$
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
$
|
369 |
-
$upgrade_notice
|
370 |
-
|
371 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
}
|
373 |
-
$upgrade_notice .= '</div> ';
|
374 |
-
echo $upgrade_notice;
|
375 |
}
|
376 |
}
|
377 |
}
|
378 |
|
|
|
379 |
$is_option_auto_update = get_option("mail-bank-automatic-update");
|
380 |
|
381 |
if($is_option_auto_update == "" || $is_option_auto_update == "1")
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: WP Mail Bank reconfigures the wp_mail() function and make it more enhanced.
|
6 |
Author: Tech Banker
|
7 |
+
Version: 1.45
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
20 |
|
21 |
global $phpmailer;
|
22 |
|
23 |
+
if(!function_exists("create_global_menus_for_mail_bank"))
|
|
|
24 |
{
|
25 |
+
function create_global_menus_for_mail_bank()
|
|
|
|
|
|
|
|
|
|
|
26 |
{
|
27 |
+
global $wpdb,$current_user;
|
28 |
+
if(is_super_admin())
|
29 |
+
{
|
30 |
+
$role = "administrator";
|
31 |
+
}
|
32 |
+
else
|
33 |
+
{
|
34 |
+
$role = $wpdb->prefix . "capabilities";
|
35 |
+
$current_user->role = array_keys($current_user->$role);
|
36 |
+
$role = $current_user->role[0];
|
37 |
+
}
|
38 |
+
include MAIL_BK_PLUGIN_DIR . "/lib/wp-include-menus.php";
|
39 |
}
|
|
|
40 |
}
|
41 |
+
|
42 |
///////////////////////////////////// Functions for Returing Table Names ////////////////////////////////////////
|
43 |
+
if(!function_exists("wp_mail_bank"))
|
44 |
{
|
45 |
+
function wp_mail_bank()
|
46 |
+
{
|
47 |
+
global $wpdb;
|
48 |
+
return $wpdb->prefix . "mail_bank";
|
49 |
+
}
|
50 |
}
|
51 |
///////////////////////////////////// Call CSS & JS Scripts - Back End ////////////////////////////////////////
|
52 |
+
if(!function_exists("backend_plugin_js_scripts_mail_bank"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
{
|
54 |
+
function backend_plugin_js_scripts_mail_bank()
|
55 |
+
{
|
56 |
+
wp_enqueue_script("jquery");
|
57 |
+
wp_enqueue_script("jquery.validate.min.js", plugins_url("/assets/js/jquery.validate.min.js",__FILE__));
|
58 |
+
}
|
59 |
}
|
60 |
|
61 |
+
if(!function_exists("backend_plugin_css_scripts_mail_bank"))
|
62 |
{
|
63 |
+
function backend_plugin_css_scripts_mail_bank()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
{
|
65 |
+
wp_enqueue_style("framework.css", plugins_url("/assets/css/framework.css",__FILE__));
|
66 |
+
wp_enqueue_style("wp-mail-bank.css", plugins_url("/assets/css/wp-mail-bank.css",__FILE__));
|
67 |
}
|
68 |
+
}
|
69 |
|
70 |
+
if(!function_exists("wp_mail_bank_configure"))
|
71 |
+
{
|
72 |
+
function wp_mail_bank_configure($phpmailer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
{
|
74 |
+
global $wpdb;
|
75 |
+
$data=$wpdb->get_row
|
76 |
+
(
|
77 |
+
"SELECT * FROM ".wp_mail_bank()
|
78 |
+
);
|
79 |
+
$mail_type = $data->mailer_type;
|
80 |
+
$phpmailer->Mailer = $data->mailer_type == 0 ? "smtp" : "mail";
|
81 |
+
$ux_chk_email_from_name = get_option("show_from_name_in_email");
|
82 |
+
if( $ux_chk_email_from_name == "" || $ux_chk_email_from_name == "1")
|
83 |
{
|
84 |
+
$phpmailer->FromName = stripslashes(htmlspecialchars_decode($data->from_name, ENT_QUOTES));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
+
$ux_chk_from_email = get_option("show_from_email_in_email");
|
87 |
+
if( $ux_chk_from_email == "" || $ux_chk_from_email == "1")
|
|
|
88 |
{
|
89 |
+
$phpmailer->From = $data->from_email;
|
90 |
}
|
91 |
+
|
92 |
+
$phpmailer->Sender = $data->return_path == 0 ? $data->return_email : $data->from_email;
|
93 |
+
$phpmailer->WordWrap = $data->word_wrap;
|
94 |
+
$phpmailer->SMTPOptions = array
|
95 |
+
(
|
96 |
+
'ssl' => array
|
97 |
+
(
|
98 |
+
'verify_peer' => false,
|
99 |
+
'verify_peer_name' => false,
|
100 |
+
'allow_self_signed' => true
|
101 |
+
)
|
102 |
+
);
|
103 |
+
if($data->mailer_type == 0)
|
104 |
{
|
105 |
+
switch($data->encryption)
|
106 |
+
{
|
107 |
+
case 0 :
|
108 |
+
$phpmailer->SMTPSecure ="";
|
109 |
+
break;
|
110 |
+
case 1 :
|
111 |
+
$phpmailer->SMTPSecure ="ssl";
|
112 |
+
break;
|
113 |
+
case 2 :
|
114 |
+
$phpmailer->SMTPSecure ="tls";
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
$phpmailer->Host = $data->smtp_host;
|
118 |
+
$phpmailer->Port = $data->smtp_port;
|
119 |
+
if($data->smtp_keep_alive == 1)
|
120 |
+
{
|
121 |
+
$phpmailer->SMTPKeepAlive = TRUE;
|
122 |
+
}
|
123 |
+
if($data->authentication == 1)
|
124 |
+
{
|
125 |
+
$phpmailer->SMTPAuth = TRUE;
|
126 |
+
$phpmailer->Username = $data->smtp_username;
|
127 |
+
$phpmailer->Password = $data->smtp_password;
|
128 |
+
}
|
129 |
}
|
130 |
}
|
131 |
}
|
132 |
|
133 |
+
|
134 |
////////////////////////////////////// Class Files Action Functions START here /////////////////////////////////////////
|
135 |
if(isset($_REQUEST["action"]))
|
136 |
{
|
137 |
+
switch(esc_attr($_REQUEST["action"]))
|
138 |
{
|
139 |
case "add_mail_library":
|
140 |
add_action( "admin_init", "add_mail_library");
|
141 |
+
if(!function_exists("add_mail_library"))
|
142 |
{
|
143 |
+
function add_mail_library()
|
|
|
|
|
|
|
|
|
|
|
144 |
{
|
145 |
+
global $wpdb,$current_user,$user_role_permission;
|
146 |
+
if(is_super_admin())
|
147 |
+
{
|
148 |
+
$role = "administrator";
|
149 |
+
}
|
150 |
+
else
|
151 |
+
{
|
152 |
+
$role = $wpdb->prefix . "capabilities";
|
153 |
+
$current_user->role = array_keys($current_user->$role);
|
154 |
+
$role = $current_user->role[0];
|
155 |
+
}
|
156 |
+
include MAIL_BK_PLUGIN_DIR . "/lib/add_mail_class_file.php";
|
157 |
}
|
|
|
158 |
}
|
159 |
break;
|
160 |
}
|
161 |
}
|
162 |
///////////////////////////////////// Call Languages for Multi-Lingual ////////////////////////////////////////
|
163 |
|
164 |
+
if(!function_exists("mail_bank_plugin_load_text_domain"))
|
165 |
{
|
166 |
+
function mail_bank_plugin_load_text_domain()
|
167 |
{
|
168 |
+
if (function_exists("load_plugin_textdomain"))
|
169 |
+
{
|
170 |
+
load_plugin_textdomain(mail_bank, false, MAIL_BK_PLUGIN_DIRNAME . "/lang");
|
171 |
+
}
|
172 |
}
|
173 |
}
|
174 |
|
175 |
+
|
176 |
///////////////////////////////////// admin menu////////////////////////////////////////
|
177 |
|
178 |
+
if(!function_exists("add_mail_icon"))
|
179 |
{
|
180 |
+
function add_mail_icon($meta = TRUE)
|
|
|
181 |
{
|
182 |
+
global $wp_admin_bar, $wpdb, $current_user;
|
183 |
+
if (is_user_logged_in())
|
|
|
|
|
|
|
184 |
{
|
185 |
+
if(is_super_admin())
|
186 |
+
{
|
187 |
+
$role = "administrator";
|
188 |
+
}
|
189 |
+
else
|
190 |
+
{
|
191 |
+
$role = $wpdb->prefix . "capabilities";
|
192 |
+
$current_user->role = array_keys($current_user->$role);
|
193 |
+
$role = $current_user->role[0];
|
194 |
+
}
|
195 |
+
switch ($role)
|
196 |
+
{
|
197 |
+
case "administrator":
|
198 |
+
$wp_admin_bar->add_menu(array(
|
199 |
+
"id" => "mail_bank",
|
200 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
|
201 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />WP Mail Bank"),
|
202 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=smtp_mail"),
|
203 |
+
));
|
204 |
|
205 |
+
$wp_admin_bar->add_menu(array(
|
206 |
+
"parent" => "mail_bank",
|
207 |
+
"id" => "Settings",
|
208 |
+
"href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
|
209 |
+
"title" => __("Settings", mail_bank))
|
210 |
+
);
|
211 |
+
$wp_admin_bar->add_menu(array(
|
212 |
+
"parent" => "mail_bank",
|
213 |
+
"id" => "send_test_email",
|
214 |
+
"href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
|
215 |
+
"title" => __("Send Test Email", mail_bank))
|
216 |
+
);
|
217 |
+
$wp_admin_bar->add_menu(array(
|
218 |
+
"parent" => "mail_bank",
|
219 |
+
"id" => "mail_plugin_update",
|
220 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_plugin_updates",
|
221 |
+
"title" => __("Plugin Updates", mail_bank))
|
222 |
+
);
|
223 |
+
$wp_admin_bar->add_menu(array(
|
224 |
+
"parent" => "mail_bank",
|
225 |
+
"id" => "mail_feedback_link",
|
226 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_feature_requests",
|
227 |
+
"title" => __("Feature Requests", mail_bank))
|
228 |
+
);
|
229 |
+
$wp_admin_bar->add_menu(array(
|
230 |
+
"parent" => "mail_bank",
|
231 |
+
"id" => "recommended",
|
232 |
+
"href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
|
233 |
+
"title" => __("Recommendations", mail_bank))
|
234 |
+
);
|
235 |
+
$wp_admin_bar->add_menu(array(
|
236 |
+
"parent" => "mail_bank",
|
237 |
+
"id" => "other_services",
|
238 |
+
"href" => site_url() . "/wp-admin/admin.php?page=other_services",
|
239 |
+
"title" => __("Our Other Services", mail_bank))
|
240 |
+
);
|
241 |
+
$wp_admin_bar->add_menu(array(
|
242 |
+
"parent" => "mail_bank",
|
243 |
+
"id" => "wp_system_status",
|
244 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
|
245 |
+
"title" => __("System Status", mail_bank))
|
246 |
+
);
|
247 |
+
break;
|
248 |
+
case "editor":
|
249 |
+
$wp_admin_bar->add_menu(array(
|
250 |
+
"id" => "mail_bank",
|
251 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
|
252 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
|
253 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
|
254 |
+
));
|
255 |
|
256 |
+
$wp_admin_bar->add_menu(array(
|
257 |
+
"parent" => "mail_bank",
|
258 |
+
"id" => "Settings",
|
259 |
+
"href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
|
260 |
+
"title" => __("Settings", mail_bank))
|
261 |
+
);
|
262 |
+
$wp_admin_bar->add_menu(array(
|
263 |
+
"parent" => "mail_bank",
|
264 |
+
"id" => "send_test_email",
|
265 |
+
"href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
|
266 |
+
"title" => __("Send Test Email", mail_bank))
|
267 |
+
);
|
268 |
+
$wp_admin_bar->add_menu(array(
|
269 |
+
"parent" => "mail_bank",
|
270 |
+
"id" => "mail_plugin_update",
|
271 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_plugin_updates",
|
272 |
+
"title" => __("Plugin Updates", mail_bank))
|
273 |
+
);
|
274 |
+
$wp_admin_bar->add_menu(array(
|
275 |
+
"parent" => "mail_bank",
|
276 |
+
"id" => "mail_feedback_link",
|
277 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_feature_requests",
|
278 |
+
"title" => __("Feature Requests", mail_bank))
|
279 |
+
);
|
280 |
+
$wp_admin_bar->add_menu(array(
|
281 |
+
"parent" => "mail_bank",
|
282 |
+
"id" => "recommended",
|
283 |
+
"href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
|
284 |
+
"title" => __("Recommendations", mail_bank))
|
285 |
+
);
|
286 |
+
$wp_admin_bar->add_menu(array(
|
287 |
+
"parent" => "mail_bank",
|
288 |
+
"id" => "other_services",
|
289 |
+
"href" => site_url() . "/wp-admin/admin.php?page=other_services",
|
290 |
+
"title" => __("Our Other Services", mail_bank))
|
291 |
+
);
|
292 |
+
$wp_admin_bar->add_menu(array(
|
293 |
+
"parent" => "mail_bank",
|
294 |
+
"id" => "wp_system_status",
|
295 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
|
296 |
+
"title" => __("System Status", mail_bank))
|
297 |
+
);
|
298 |
+
break;
|
299 |
+
case "author":
|
300 |
+
$wp_admin_bar->add_menu(array(
|
301 |
+
"id" => "mail_bank",
|
302 |
+
"title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
|
303 |
+
height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
|
304 |
+
"href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
|
305 |
+
));
|
306 |
|
307 |
+
$wp_admin_bar->add_menu(array(
|
308 |
+
"parent" => "mail_bank",
|
309 |
+
"id" => "Settings",
|
310 |
+
"href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
|
311 |
+
"title" => __("Settings", mail_bank))
|
312 |
+
);
|
313 |
+
$wp_admin_bar->add_menu(array(
|
314 |
+
"parent" => "mail_bank",
|
315 |
+
"id" => "send_test_email",
|
316 |
+
"href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
|
317 |
+
"title" => __("Send Test Email", mail_bank))
|
318 |
+
);
|
319 |
+
$wp_admin_bar->add_menu(array(
|
320 |
+
"parent" => "mail_bank",
|
321 |
+
"id" => "mail_plugin_update",
|
322 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_plugin_updates",
|
323 |
+
"title" => __("Plugin Updates", mail_bank))
|
324 |
+
);
|
325 |
+
$wp_admin_bar->add_menu(array(
|
326 |
+
"parent" => "mail_bank",
|
327 |
+
"id" => "mail_feedback_link",
|
328 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_feature_requests",
|
329 |
+
"title" => __("Feature Requests", mail_bank))
|
330 |
+
);
|
331 |
+
$wp_admin_bar->add_menu(array(
|
332 |
+
"parent" => "mail_bank",
|
333 |
+
"id" => "recommended",
|
334 |
+
"href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
|
335 |
+
"title" => __("Recommendations", mail_bank))
|
336 |
+
);
|
337 |
+
$wp_admin_bar->add_menu(array(
|
338 |
+
"parent" => "mail_bank",
|
339 |
+
"id" => "other_services",
|
340 |
+
"href" => site_url() . "/wp-admin/admin.php?page=other_services",
|
341 |
+
"title" => __("Our Other Services", mail_bank))
|
342 |
+
);
|
343 |
+
$wp_admin_bar->add_menu(array(
|
344 |
+
"parent" => "mail_bank",
|
345 |
+
"id" => "wp_system_status",
|
346 |
+
"href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
|
347 |
+
"title" => __("System Status", mail_bank))
|
348 |
+
);
|
349 |
+
break;
|
350 |
+
}
|
351 |
}
|
352 |
}
|
353 |
}
|
354 |
+
|
355 |
///////////////////////////////////// Call Install Script on Plugin Activation ////////////////////////////////////////
|
356 |
if(!function_exists("plugin_install_script_for_mail_bank"))
|
357 |
{
|
381 |
}
|
382 |
}
|
383 |
|
384 |
+
if(!function_exists("mail_bank_plugin_update_message"))
|
385 |
{
|
386 |
+
function mail_bank_plugin_update_message($args)
|
|
|
387 |
{
|
388 |
+
$response = wp_remote_get( 'http://plugins.svn.wordpress.org/wp-mail-bank/trunk/readme.txt' );
|
389 |
+
if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) )
|
390 |
+
{
|
391 |
+
// Output Upgrade Notice
|
392 |
+
$matches = null;
|
393 |
+
$regexp = '~==\s*Changelog\s*==\s*=\s*[0-9.]+\s*=(.*)(=\s*' . preg_quote($args['Version']) . '\s*=|$)~Uis';
|
394 |
+
$upgrade_notice = '';
|
395 |
+
if ( preg_match( $regexp, $response['body'], $matches ) ) {
|
396 |
+
$changelog = (array) preg_split('~[\r\n]+~', trim($matches[1]));
|
397 |
+
$upgrade_notice .= '<div class="framework_plugin_message">';
|
398 |
+
foreach ( $changelog as $index => $line ) {
|
399 |
+
$upgrade_notice .= "<p>".$line."</p>";
|
400 |
+
}
|
401 |
+
$upgrade_notice .= '</div> ';
|
402 |
+
echo $upgrade_notice;
|
403 |
}
|
|
|
|
|
404 |
}
|
405 |
}
|
406 |
}
|
407 |
|
408 |
+
|
409 |
$is_option_auto_update = get_option("mail-bank-automatic-update");
|
410 |
|
411 |
if($is_option_auto_update == "" || $is_option_auto_update == "1")
|