WP Mail Bank: WordPress SMTP Plugin & Email Logs - Version 1.8

Version Description

  • Bug Fixed in WP Mail Bank
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 WP Mail Bank: WordPress SMTP Plugin & Email Logs
Version 1.8
Comparing to
See all releases

Code changes from version 1.7 to 1.8

Files changed (3) hide show
  1. lib/wp-include-menus.php +123 -118
  2. readme.txt +5 -1
  3. wp-mail-bank.php +150 -146
lib/wp-include-menus.php CHANGED
@@ -2,147 +2,152 @@
2
  //--------------------------------------------------------------------------------------------------------------//
3
  // CODE FOR CREATING MENUS
4
  //---------------------------------------------------------------------------------------------------------------//
5
-
6
- switch($role)
7
  {
8
- case "administrator":
9
- add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
10
- add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
11
- add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
12
- add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
13
- add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
14
- add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
15
- add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
 
 
 
 
 
 
16
  break;
17
- case "editor":
18
- add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
19
- add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
20
- add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
21
- add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
22
- add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
23
- add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
24
- add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
25
  break;
26
- case "author":
27
- add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
28
- add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
29
- add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
30
- add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
31
- add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
32
- add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
33
- add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
34
  break;
35
- }
36
-
37
- //--------------------------------------------------------------------------------------------------------------//
38
- // CODE FOR CREATING PAGES
39
- //---------------------------------------------------------------------------------------------------------------//
40
- if(!function_exists( "smtp_mail" ))
41
- {
42
- function smtp_mail()
43
  {
44
- global $wpdb,$current_user,$user_role_permission;
45
- if(is_super_admin())
46
  {
47
- $role = "administrator";
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
- else
50
- {
51
- $role = $wpdb->prefix . "capabilities";
52
- $current_user->role = array_keys($current_user->$role);
53
- $role = $current_user->role[0];
54
- }
55
- include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
56
- include_once MAIL_BK_PLUGIN_DIR ."/views/mail_settings.php";
57
  }
58
- }
59
- if(!function_exists( "mail_system_status" ))
60
- {
61
- function mail_system_status()
62
  {
63
- global $wpdb,$current_user,$user_role_permission,$wp_version;
64
- if(is_super_admin())
65
- {
66
- $role = "administrator";
67
- }
68
- else
69
  {
70
- $role = $wpdb->prefix . "capabilities";
71
- $current_user->role = array_keys($current_user->$role);
72
- $role = $current_user->role[0];
 
 
 
 
 
 
 
 
 
 
73
  }
74
- include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
75
- include_once MAIL_BK_PLUGIN_DIR . "/views/wp_system_status.php";
76
  }
77
- }
78
- if(!function_exists( "send_test_email" ))
79
- {
80
- function send_test_email()
81
  {
82
- global $wpdb,$current_user,$user_role_permission,$wp_version;
83
- if(is_super_admin())
84
- {
85
- $role = "administrator";
86
- }
87
- else
88
  {
89
- $role = $wpdb->prefix . "capabilities";
90
- $current_user->role = array_keys($current_user->$role);
91
- $role = $current_user->role[0];
 
 
 
 
 
 
 
 
 
 
92
  }
93
- include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
94
- include_once MAIL_BK_PLUGIN_DIR . "/views/test_email.php";
95
  }
96
- }
97
- if(!function_exists( "recommended_plugins" ))
98
- {
99
- function recommended_plugins()
100
  {
101
- global $wpdb,$current_user,$user_role_permission,$wp_version;
102
- if(is_super_admin())
103
- {
104
- $role = "administrator";
105
- }
106
- else
107
- {
108
- $role = $wpdb->prefix . "capabilities";
109
- $current_user->role = array_keys($current_user->$role);
110
- $role = $current_user->role[0];
111
- }
112
- if(file_exists(MAIL_BK_PLUGIN_DIR."/views/mail_header.php"))
113
- {
114
- include_once MAIL_BK_PLUGIN_DIR."/views/mail_header.php";
115
- }
116
- if (file_exists(MAIL_BK_PLUGIN_DIR ."/views/recommended-plugins.php"))
117
  {
118
- include_once MAIL_BK_PLUGIN_DIR ."/views/recommended-plugins.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
  }
121
- }
122
- if(!function_exists( "other_services" ))
123
- {
124
- function other_services()
125
  {
126
- global $wpdb,$current_user,$user_role_permission,$wp_version;
127
- if(is_super_admin())
128
- {
129
- $role = "administrator";
130
- }
131
- else
132
- {
133
- $role = $wpdb->prefix . "capabilities";
134
- $current_user->role = array_keys($current_user->$role);
135
- $role = $current_user->role[0];
136
- }
137
- if(file_exists(MAIL_BK_PLUGIN_DIR."/views/mail_header.php"))
138
- {
139
- include_once MAIL_BK_PLUGIN_DIR."/views/mail_header.php";
140
- }
141
- if (file_exists(MAIL_BK_PLUGIN_DIR ."/views/other-services.php"))
142
  {
143
- include_once MAIL_BK_PLUGIN_DIR ."/views/other-services.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
  }
146
  }
147
-
148
  ?>
2
  //--------------------------------------------------------------------------------------------------------------//
3
  // CODE FOR CREATING MENUS
4
  //---------------------------------------------------------------------------------------------------------------//
5
+ if (!is_user_logged_in())
 
6
  {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ switch($role)
12
+ {
13
+ case "administrator":
14
+ add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
15
+ add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
16
+ add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
17
+ add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
18
+ add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
19
+ add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
20
+ add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
21
  break;
22
+ case "editor":
23
+ add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
24
+ add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
25
+ add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
26
+ add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
27
+ add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
28
+ add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
29
+ add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
30
  break;
31
+ case "author":
32
+ add_menu_page("WP Mail Bank", __("WP Mail Bank", mail_bank), "read", "smtp_mail","", plugins_url("/assets/images/mail.png" , dirname(__FILE__)));
33
+ add_submenu_page("smtp_mail", "Settings", __("Settings", mail_bank), "read", "smtp_mail","smtp_mail");
34
+ add_submenu_page("smtp_mail", "Send Test Email", __("Send Test Email", mail_bank), "read", "send_test_email","send_test_email");
35
+ add_submenu_page("", "", "", "read", "send_test_email", "send_test_email");
36
+ add_submenu_page("smtp_mail", "Recommendations", __("Recommendations", mail_bank), "read", "recommended_plugins", "recommended_plugins" );
37
+ add_submenu_page("smtp_mail", "Our Other Services", __("Our Other Services", mail_bank), "read", "other_services", "other_services" );
38
+ add_submenu_page("smtp_mail", "System Status", __("System Status", mail_bank), "read", "mail_system_status", "mail_system_status" );
39
  break;
40
+ }
41
+
42
+ //--------------------------------------------------------------------------------------------------------------//
43
+ // CODE FOR CREATING PAGES
44
+ //---------------------------------------------------------------------------------------------------------------//
45
+ if(!function_exists( "smtp_mail" ))
 
 
46
  {
47
+ function smtp_mail()
 
48
  {
49
+ global $wpdb,$current_user,$user_role_permission;
50
+ if(is_super_admin())
51
+ {
52
+ $role = "administrator";
53
+ }
54
+ else
55
+ {
56
+ $role = $wpdb->prefix . "capabilities";
57
+ $current_user->role = array_keys($current_user->$role);
58
+ $role = $current_user->role[0];
59
+ }
60
+ include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
61
+ include_once MAIL_BK_PLUGIN_DIR ."/views/mail_settings.php";
62
  }
 
 
 
 
 
 
 
 
63
  }
64
+ if(!function_exists( "mail_system_status" ))
 
 
 
65
  {
66
+ function mail_system_status()
 
 
 
 
 
67
  {
68
+ global $wpdb,$current_user,$user_role_permission,$wp_version;
69
+ if(is_super_admin())
70
+ {
71
+ $role = "administrator";
72
+ }
73
+ else
74
+ {
75
+ $role = $wpdb->prefix . "capabilities";
76
+ $current_user->role = array_keys($current_user->$role);
77
+ $role = $current_user->role[0];
78
+ }
79
+ include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
80
+ include_once MAIL_BK_PLUGIN_DIR . "/views/wp_system_status.php";
81
  }
 
 
82
  }
83
+ if(!function_exists( "send_test_email" ))
 
 
 
84
  {
85
+ function send_test_email()
 
 
 
 
 
86
  {
87
+ global $wpdb,$current_user,$user_role_permission,$wp_version;
88
+ if(is_super_admin())
89
+ {
90
+ $role = "administrator";
91
+ }
92
+ else
93
+ {
94
+ $role = $wpdb->prefix . "capabilities";
95
+ $current_user->role = array_keys($current_user->$role);
96
+ $role = $current_user->role[0];
97
+ }
98
+ include_once MAIL_BK_PLUGIN_DIR ."/views/mail_header.php";
99
+ include_once MAIL_BK_PLUGIN_DIR . "/views/test_email.php";
100
  }
 
 
101
  }
102
+ if(!function_exists( "recommended_plugins" ))
 
 
 
103
  {
104
+ function recommended_plugins()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  {
106
+ global $wpdb,$current_user,$user_role_permission,$wp_version;
107
+ if(is_super_admin())
108
+ {
109
+ $role = "administrator";
110
+ }
111
+ else
112
+ {
113
+ $role = $wpdb->prefix . "capabilities";
114
+ $current_user->role = array_keys($current_user->$role);
115
+ $role = $current_user->role[0];
116
+ }
117
+ if(file_exists(MAIL_BK_PLUGIN_DIR."/views/mail_header.php"))
118
+ {
119
+ include_once MAIL_BK_PLUGIN_DIR."/views/mail_header.php";
120
+ }
121
+ if (file_exists(MAIL_BK_PLUGIN_DIR ."/views/recommended-plugins.php"))
122
+ {
123
+ include_once MAIL_BK_PLUGIN_DIR ."/views/recommended-plugins.php";
124
+ }
125
  }
126
  }
127
+ if(!function_exists( "other_services" ))
 
 
 
128
  {
129
+ function other_services()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  {
131
+ global $wpdb,$current_user,$user_role_permission,$wp_version;
132
+ if(is_super_admin())
133
+ {
134
+ $role = "administrator";
135
+ }
136
+ else
137
+ {
138
+ $role = $wpdb->prefix . "capabilities";
139
+ $current_user->role = array_keys($current_user->$role);
140
+ $role = $current_user->role[0];
141
+ }
142
+ if(file_exists(MAIL_BK_PLUGIN_DIR."/views/mail_header.php"))
143
+ {
144
+ include_once MAIL_BK_PLUGIN_DIR."/views/mail_header.php";
145
+ }
146
+ if (file_exists(MAIL_BK_PLUGIN_DIR ."/views/other-services.php"))
147
+ {
148
+ include_once MAIL_BK_PLUGIN_DIR ."/views/other-services.php";
149
+ }
150
  }
151
  }
152
  }
 
153
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank
3
  Tags: admin, ajax, email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, plugin, Post, posts, privacy, security, sendmail, smtp, ssl, tls, wordpress smtp, wp smtp, wp-phpmailer, wp_mail, wp mail, mailer
4
  Requires at least: 2.7
5
  Tested up to: 4.0.1
6
- Stable tag: 1.7
7
 
8
  WP Mail Bank reconfigures the PHPMailer and make it more enhanced with advanced smtp settings options.
9
 
@@ -223,6 +223,10 @@ If any problem occurs, please contact us at [support@tech-banker.com](mailto:sup
223
  4. Debugging Output Console Log
224
  == Changelog ==
225
 
 
 
 
 
226
  = 1.7 =
227
 
228
  * Recommendation Section Changed
3
  Tags: admin, ajax, email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, plugin, Post, posts, privacy, security, sendmail, smtp, ssl, tls, wordpress smtp, wp smtp, wp-phpmailer, wp_mail, wp mail, mailer
4
  Requires at least: 2.7
5
  Tested up to: 4.0.1
6
+ Stable tag: 1.8
7
 
8
  WP Mail Bank reconfigures the PHPMailer and make it more enhanced with advanced smtp settings options.
9
 
223
  4. Debugging Output Console Log
224
  == Changelog ==
225
 
226
+ = 1.8 =
227
+
228
+ * Bug Fixed in WP Mail Bank
229
+
230
  = 1.7 =
231
 
232
  * Recommendation Section Changed
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.7
8
  Author URI: http://tech-banker.com
9
  */
10
 
@@ -74,13 +74,13 @@ function wp_mail_bank_configure($phpmailer)
74
  {
75
  case 0 :
76
  $phpmailer->SMTPSecure ="";
77
- break;
78
  case 1 :
79
  $phpmailer->SMTPSecure ="ssl";
80
- break;
81
  case 2 :
82
  $phpmailer->SMTPSecure ="tls";
83
- break;
84
  }
85
  $phpmailer->Host = $data->smtp_host;
86
  $phpmailer->Port = $data->smtp_port;
@@ -103,22 +103,22 @@ if(isset($_REQUEST["action"]))
103
  switch($_REQUEST["action"])
104
  {
105
  case "add_mail_library":
106
- add_action( "admin_init", "add_mail_library");
107
- function add_mail_library()
108
- {
109
- global $wpdb,$current_user,$user_role_permission;
110
- if(is_super_admin())
111
- {
112
- $role = "administrator";
113
- }
114
- else
115
  {
116
- $role = $wpdb->prefix . "capabilities";
117
- $current_user->role = array_keys($current_user->$role);
118
- $role = $current_user->role[0];
 
 
 
 
 
 
 
 
 
119
  }
120
- include MAIL_BK_PLUGIN_DIR . "/lib/add_mail_class_file.php";
121
- }
122
  break;
123
  }
124
  }
@@ -136,136 +136,140 @@ function mail_bank_plugin_load_text_domain()
136
 
137
  function add_mail_icon($meta = TRUE)
138
  {
 
139
  global $wp_admin_bar, $wpdb, $current_user;
140
- if(is_super_admin())
141
- {
142
- $role = "administrator";
143
- }
144
- else
145
- {
146
- $role = $wpdb->prefix . "capabilities";
147
- $current_user->role = array_keys($current_user->$role);
148
- $role = $current_user->role[0];
149
- }
150
- switch ($role)
151
  {
152
- case "administrator":
153
- $wp_admin_bar->add_menu(array(
154
- "id" => "mail_bank",
155
- "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
156
- height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />WP Mail Bank"),
157
- "href" => __(site_url() . "/wp-admin/admin.php?page=smtp_mail"),
158
- ));
159
-
160
- $wp_admin_bar->add_menu(array(
161
- "parent" => "mail_bank",
162
- "id" => "Settings",
163
- "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
164
- "title" => __("Settings", mail_bank))
165
- );
166
- $wp_admin_bar->add_menu(array(
167
- "parent" => "mail_bank",
168
- "id" => "send_test_email",
169
- "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
170
- "title" => __("Send Test Email", mail_bank))
171
- );
172
- $wp_admin_bar->add_menu(array(
173
- "parent" => "mail_bank",
174
- "id" => "recommended",
175
- "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
176
- "title" => __("Recommendations", mail_bank))
177
- );
178
- $wp_admin_bar->add_menu(array(
179
- "parent" => "mail_bank",
180
- "id" => "other_services",
181
- "href" => site_url() . "/wp-admin/admin.php?page=other_services",
182
- "title" => __("Our Other Services", mail_bank))
183
- );
184
- $wp_admin_bar->add_menu(array(
185
- "parent" => "mail_bank",
186
- "id" => "wp_system_status",
187
- "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
188
- "title" => __("System Status", mail_bank))
189
- );
190
- break;
191
- case "editor":
192
- $wp_admin_bar->add_menu(array(
193
- "id" => "mail_bank",
194
- "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
195
- height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
196
- "href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
197
- ));
198
-
199
- $wp_admin_bar->add_menu(array(
200
- "parent" => "mail_bank",
201
- "id" => "Settings",
202
- "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
203
- "title" => __("Settings", mail_bank))
204
- );
205
- $wp_admin_bar->add_menu(array(
206
- "parent" => "mail_bank",
207
- "id" => "send_test_email",
208
- "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
209
- "title" => __("Send Test Email", mail_bank))
210
- );
211
- $wp_admin_bar->add_menu(array(
212
- "parent" => "mail_bank",
213
- "id" => "recommended",
214
- "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
215
- "title" => __("Recommendations", mail_bank))
216
- );
217
- $wp_admin_bar->add_menu(array(
218
- "parent" => "mail_bank",
219
- "id" => "other_services",
220
- "href" => site_url() . "/wp-admin/admin.php?page=other_services",
221
- "title" => __("Our Other Services", mail_bank))
222
- );
223
- $wp_admin_bar->add_menu(array(
224
- "parent" => "mail_bank",
225
- "id" => "wp_system_status",
226
- "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
227
- "title" => __("System Status", mail_bank))
228
- );
229
- break;
230
- case "author":
231
- $wp_admin_bar->add_menu(array(
232
- "id" => "mail_bank",
233
- "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
234
- height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
235
- "href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
236
- ));
237
-
238
- $wp_admin_bar->add_menu(array(
239
- "parent" => "mail_bank",
240
- "id" => "Settings",
241
- "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
242
- "title" => __("Settings", mail_bank))
243
- );
244
- $wp_admin_bar->add_menu(array(
245
- "parent" => "mail_bank",
246
- "id" => "send_test_email",
247
- "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
248
- "title" => __("Send Test Email", mail_bank))
249
- );
250
- $wp_admin_bar->add_menu(array(
251
- "parent" => "mail_bank",
252
- "id" => "recommended",
253
- "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
254
- "title" => __("Recommendations", mail_bank))
255
- );
256
- $wp_admin_bar->add_menu(array(
257
- "parent" => "mail_bank",
258
- "id" => "other_services",
259
- "href" => site_url() . "/wp-admin/admin.php?page=other_services",
260
- "title" => __("Our Other Services", mail_bank))
261
- );
262
- $wp_admin_bar->add_menu(array(
263
- "parent" => "mail_bank",
264
- "id" => "wp_system_status",
265
- "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
266
- "title" => __("System Status", mail_bank))
267
- );
268
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  }
270
  }
271
  ///////////////////////////////////// Call Install Script on Plugin Activation ////////////////////////////////////////
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
8
  Author URI: http://tech-banker.com
9
  */
10
 
74
  {
75
  case 0 :
76
  $phpmailer->SMTPSecure ="";
77
+ break;
78
  case 1 :
79
  $phpmailer->SMTPSecure ="ssl";
80
+ break;
81
  case 2 :
82
  $phpmailer->SMTPSecure ="tls";
83
+ break;
84
  }
85
  $phpmailer->Host = $data->smtp_host;
86
  $phpmailer->Port = $data->smtp_port;
103
  switch($_REQUEST["action"])
104
  {
105
  case "add_mail_library":
106
+ add_action( "admin_init", "add_mail_library");
107
+ function add_mail_library()
 
 
 
 
 
 
 
108
  {
109
+ global $wpdb,$current_user,$user_role_permission;
110
+ if(is_super_admin())
111
+ {
112
+ $role = "administrator";
113
+ }
114
+ else
115
+ {
116
+ $role = $wpdb->prefix . "capabilities";
117
+ $current_user->role = array_keys($current_user->$role);
118
+ $role = $current_user->role[0];
119
+ }
120
+ include MAIL_BK_PLUGIN_DIR . "/lib/add_mail_class_file.php";
121
  }
 
 
122
  break;
123
  }
124
  }
136
 
137
  function add_mail_icon($meta = TRUE)
138
  {
139
+
140
  global $wp_admin_bar, $wpdb, $current_user;
141
+ if (!is_user_logged_in())
 
 
 
 
 
 
 
 
 
 
142
  {
143
+ if(is_super_admin())
144
+ {
145
+ $role = "administrator";
146
+ }
147
+ else
148
+ {
149
+ $role = $wpdb->prefix . "capabilities";
150
+ $current_user->role = array_keys($current_user->$role);
151
+ $role = $current_user->role[0];
152
+ }
153
+ switch ($role)
154
+ {
155
+ case "administrator":
156
+ $wp_admin_bar->add_menu(array(
157
+ "id" => "mail_bank",
158
+ "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
159
+ height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />WP Mail Bank"),
160
+ "href" => __(site_url() . "/wp-admin/admin.php?page=smtp_mail"),
161
+ ));
162
+
163
+ $wp_admin_bar->add_menu(array(
164
+ "parent" => "mail_bank",
165
+ "id" => "Settings",
166
+ "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
167
+ "title" => __("Settings", mail_bank))
168
+ );
169
+ $wp_admin_bar->add_menu(array(
170
+ "parent" => "mail_bank",
171
+ "id" => "send_test_email",
172
+ "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
173
+ "title" => __("Send Test Email", mail_bank))
174
+ );
175
+ $wp_admin_bar->add_menu(array(
176
+ "parent" => "mail_bank",
177
+ "id" => "recommended",
178
+ "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
179
+ "title" => __("Recommendations", mail_bank))
180
+ );
181
+ $wp_admin_bar->add_menu(array(
182
+ "parent" => "mail_bank",
183
+ "id" => "other_services",
184
+ "href" => site_url() . "/wp-admin/admin.php?page=other_services",
185
+ "title" => __("Our Other Services", mail_bank))
186
+ );
187
+ $wp_admin_bar->add_menu(array(
188
+ "parent" => "mail_bank",
189
+ "id" => "wp_system_status",
190
+ "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
191
+ "title" => __("System Status", mail_bank))
192
+ );
193
+ break;
194
+ case "editor":
195
+ $wp_admin_bar->add_menu(array(
196
+ "id" => "mail_bank",
197
+ "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
198
+ height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
199
+ "href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
200
+ ));
201
+
202
+ $wp_admin_bar->add_menu(array(
203
+ "parent" => "mail_bank",
204
+ "id" => "Settings",
205
+ "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
206
+ "title" => __("Settings", mail_bank))
207
+ );
208
+ $wp_admin_bar->add_menu(array(
209
+ "parent" => "mail_bank",
210
+ "id" => "send_test_email",
211
+ "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
212
+ "title" => __("Send Test Email", mail_bank))
213
+ );
214
+ $wp_admin_bar->add_menu(array(
215
+ "parent" => "mail_bank",
216
+ "id" => "recommended",
217
+ "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
218
+ "title" => __("Recommendations", mail_bank))
219
+ );
220
+ $wp_admin_bar->add_menu(array(
221
+ "parent" => "mail_bank",
222
+ "id" => "other_services",
223
+ "href" => site_url() . "/wp-admin/admin.php?page=other_services",
224
+ "title" => __("Our Other Services", mail_bank))
225
+ );
226
+ $wp_admin_bar->add_menu(array(
227
+ "parent" => "mail_bank",
228
+ "id" => "wp_system_status",
229
+ "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
230
+ "title" => __("System Status", mail_bank))
231
+ );
232
+ break;
233
+ case "author":
234
+ $wp_admin_bar->add_menu(array(
235
+ "id" => "mail_bank",
236
+ "title" => __("<img src=\"" . plugins_url("/assets/images/mail.png",__FILE__)."\" width=\"25\"
237
+ height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Wp Mail Bank"),
238
+ "href" => __(site_url() . "/wp-admin/admin.php?page=mail_settings"),
239
+ ));
240
+
241
+ $wp_admin_bar->add_menu(array(
242
+ "parent" => "mail_bank",
243
+ "id" => "Settings",
244
+ "href" => site_url() . "/wp-admin/admin.php?page=smtp_mail",
245
+ "title" => __("Settings", mail_bank))
246
+ );
247
+ $wp_admin_bar->add_menu(array(
248
+ "parent" => "mail_bank",
249
+ "id" => "send_test_email",
250
+ "href" => site_url() . "/wp-admin/admin.php?page=send_test_email",
251
+ "title" => __("Send Test Email", mail_bank))
252
+ );
253
+ $wp_admin_bar->add_menu(array(
254
+ "parent" => "mail_bank",
255
+ "id" => "recommended",
256
+ "href" => site_url() . "/wp-admin/admin.php?page=recommended_plugins",
257
+ "title" => __("Recommendations", mail_bank))
258
+ );
259
+ $wp_admin_bar->add_menu(array(
260
+ "parent" => "mail_bank",
261
+ "id" => "other_services",
262
+ "href" => site_url() . "/wp-admin/admin.php?page=other_services",
263
+ "title" => __("Our Other Services", mail_bank))
264
+ );
265
+ $wp_admin_bar->add_menu(array(
266
+ "parent" => "mail_bank",
267
+ "id" => "wp_system_status",
268
+ "href" => site_url() . "/wp-admin/admin.php?page=mail_system_status",
269
+ "title" => __("System Status", mail_bank))
270
+ );
271
+ break;
272
+ }
273
  }
274
  }
275
  ///////////////////////////////////// Call Install Script on Plugin Activation ////////////////////////////////////////