Version Description
- Bug Fixed with Menu Links shown to Subscriber and other roles.
Download this release
Release Info
Developer | contact-banker |
Plugin | Contact Bank: WordPress Form Builder for Contact Forms |
Version | 2.0.35 |
Comparing to | |
See all releases |
Code changes from version 2.0.34 to 2.0.35
- contact-bank.php +249 -73
- lib/contact_bank_email-class.php +28 -8
- readme.txt +6 -2
- views/dashboard.php +95 -21
- views/header.php +57 -9
contact-bank.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Bank Standard Edition
|
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
|
6 |
Author: Tech Banker
|
7 |
-
Version: 2.0.
|
8 |
Author URI: http://tech-banker.com
|
9 |
*/
|
10 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -51,18 +51,61 @@ function plugin_install_script_for_contact_bank()
|
|
51 |
*/
|
52 |
function create_global_menus_for_contact_bank()
|
53 |
{
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
/* Function Name : contact_bank
|
68 |
* Paramters : None
|
@@ -103,12 +146,6 @@ function frontend_data()
|
|
103 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_frontend_data.php";
|
104 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
|
105 |
}
|
106 |
-
// function documentation()
|
107 |
-
// {
|
108 |
-
// include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
|
109 |
-
// include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_documentation.php";
|
110 |
-
// include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
|
111 |
-
// }
|
112 |
function add_contact_email_settings()
|
113 |
{
|
114 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
|
@@ -313,65 +350,204 @@ function extract_short_code($form_id,$show_title)
|
|
313 |
}
|
314 |
function add_contact_bank_icon($meta = TRUE)
|
315 |
{
|
316 |
-
|
|
|
317 |
if (!is_user_logged_in() ) { return; }
|
318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
"id" => "contact_bank_links",
|
320 |
"title" => "<img src=\"".CONTACT_BK_PLUGIN_URL."/assets/images/icon.png\" width=\"25\" height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Contact Bank" ,
|
321 |
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
"
|
371 |
-
|
372 |
-
"title" => __("Purchase PRO Edition", contact_bank)) /* set the sub-menu name */
|
373 |
-
);
|
374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
}
|
376 |
add_action( "media_buttons_context", "add_contact_shortcode_button", 1);
|
377 |
function add_contact_shortcode_button($context) {
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
|
6 |
Author: Tech Banker
|
7 |
+
Version: 2.0.35
|
8 |
Author URI: http://tech-banker.com
|
9 |
*/
|
10 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
51 |
*/
|
52 |
function create_global_menus_for_contact_bank()
|
53 |
{
|
54 |
+
global $wpdb,$current_user;
|
55 |
+
$role = $wpdb->prefix . "capabilities";
|
56 |
+
$current_user->role = array_keys($current_user->$role);
|
57 |
+
$role = $current_user->role[0];
|
58 |
+
|
59 |
+
switch ($role) {
|
60 |
+
case "administrator":
|
61 |
+
add_menu_page("Contact Bank", __("Contact Bank", contact_bank), "read", "dashboard","",CONTACT_BK_PLUGIN_URL . "/assets/images/icon.png");
|
62 |
+
add_submenu_page("dashboard", "Dashboard", __("Dashboard", contact_bank), "read", "dashboard","dashboard");
|
63 |
+
add_submenu_page("","","", "read", "contact_bank","contact_bank");
|
64 |
+
add_submenu_page("dashboard", "Short-Codes", __("Short-Codes", contact_bank), "read", "short_code", "short_code" );
|
65 |
+
add_submenu_page("dashboard", "Form Entries", __("Form Entries", contact_bank), "read", "frontend_data","frontend_data");
|
66 |
+
add_submenu_page("dashboard", "Email Settings", __("Email Settings", contact_bank), "read", "contact_email", "contact_email");
|
67 |
+
add_submenu_page("dashboard", "Global Settings", __("Global Settings", contact_bank), "read", "layout_settings", "layout_settings");
|
68 |
+
add_submenu_page("dashboard", "System Status", __("System Status", contact_bank), "read", "system_status", "system_status" );
|
69 |
+
add_submenu_page("dashboard", "Purchase PRO Edition", __("Purchase PRO Edition", contact_bank), "read", "pro_version", "pro_version" );
|
70 |
+
add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
|
71 |
+
add_submenu_page("","","", "read", "form_preview", "form_preview" );
|
72 |
+
break;
|
73 |
+
case "editor":
|
74 |
+
add_menu_page("Contact Bank", __("Contact Bank", contact_bank), "read", "dashboard","",CONTACT_BK_PLUGIN_URL . "/assets/images/icon.png");
|
75 |
+
add_submenu_page("dashboard", "Dashboard", __("Dashboard", contact_bank), "read", "dashboard","dashboard");
|
76 |
+
add_submenu_page("","","", "read", "contact_bank","contact_bank");
|
77 |
+
add_submenu_page("dashboard", "Short-Codes", __("Short-Codes", contact_bank), "read", "short_code", "short_code" );
|
78 |
+
add_submenu_page("dashboard", "Form Entries", __("Form Entries", contact_bank), "read", "frontend_data","frontend_data");
|
79 |
+
add_submenu_page("dashboard", "Email Settings", __("Email Settings", contact_bank), "read", "contact_email", "contact_email");
|
80 |
+
add_submenu_page("dashboard", "Global Settings", __("Global Settings", contact_bank), "read", "layout_settings", "layout_settings");
|
81 |
+
add_submenu_page("dashboard", "System Status", __("System Status", contact_bank), "read", "system_status", "system_status" );
|
82 |
+
add_submenu_page("dashboard", "Purchase PRO Edition", __("Purchase PRO Edition", contact_bank), "read", "pro_version", "pro_version" );
|
83 |
+
add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
|
84 |
+
add_submenu_page("","","", "read", "form_preview", "form_preview" );
|
85 |
+
break;
|
86 |
+
case "author":
|
87 |
+
add_menu_page("Contact Bank", __("Contact Bank", contact_bank), "read", "dashboard","",CONTACT_BK_PLUGIN_URL . "/assets/images/icon.png");
|
88 |
+
add_submenu_page("dashboard", "Dashboard", __("Dashboard", contact_bank), "read", "dashboard","dashboard");
|
89 |
+
add_submenu_page("dashboard", "Short-Codes", __("Short-Codes", contact_bank), "read", "short_code", "short_code" );
|
90 |
+
add_submenu_page("dashboard", "Form Entries", __("Form Entries", contact_bank), "read", "frontend_data","frontend_data");
|
91 |
+
add_submenu_page("dashboard", "Email Settings", __("Email Settings", contact_bank), "read", "contact_email", "contact_email");
|
92 |
+
add_submenu_page("dashboard", "Global Settings", __("Global Settings", contact_bank), "read", "layout_settings", "layout_settings");
|
93 |
+
add_submenu_page("dashboard", "Purchase PRO Edition", __("Purchase PRO Edition", contact_bank), "read", "pro_version", "pro_version" );
|
94 |
+
add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
|
95 |
+
add_submenu_page("","","", "read", "form_preview", "form_preview" );
|
96 |
+
break;
|
97 |
+
case "contributor":
|
98 |
+
add_menu_page("Contact Bank", __("Contact Bank", contact_bank), "read", "dashboard","",CONTACT_BK_PLUGIN_URL . "/assets/images/icon.png");
|
99 |
+
add_submenu_page("dashboard", "Dashboard", __("Dashboard", contact_bank), "read", "dashboard","dashboard");
|
100 |
+
add_submenu_page("dashboard", "Short-Codes", __("Short-Codes", contact_bank), "read", "short_code", "short_code" );
|
101 |
+
add_submenu_page("dashboard", "Form Entries", __("Form Entries", contact_bank), "read", "frontend_data","frontend_data");
|
102 |
+
add_submenu_page("dashboard", "Email Settings", __("Email Settings", contact_bank), "read", "contact_email", "contact_email");
|
103 |
+
add_submenu_page("dashboard", "Global Settings", __("Global Settings", contact_bank), "read", "layout_settings", "layout_settings");
|
104 |
+
add_submenu_page("dashboard", "Purchase PRO Edition", __("Purchase PRO Edition", contact_bank), "read", "pro_version", "pro_version" );
|
105 |
+
add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
|
106 |
+
add_submenu_page("","","", "read", "form_preview", "form_preview" );
|
107 |
+
break;
|
108 |
+
}
|
109 |
}
|
110 |
/* Function Name : contact_bank
|
111 |
* Paramters : None
|
146 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_frontend_data.php";
|
147 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
|
148 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
function add_contact_email_settings()
|
150 |
{
|
151 |
include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
|
350 |
}
|
351 |
function add_contact_bank_icon($meta = TRUE)
|
352 |
{
|
353 |
+
|
354 |
+
global $wp_admin_bar,$wpdb,$current_user;
|
355 |
if (!is_user_logged_in() ) { return; }
|
356 |
+
$role = $wpdb->prefix . "capabilities";
|
357 |
+
$current_user->role = array_keys($current_user->$role);
|
358 |
+
$role = $current_user->role[0];
|
359 |
+
switch ($role)
|
360 |
+
{
|
361 |
+
case "administrator":
|
362 |
+
$wp_admin_bar->add_menu( array(
|
363 |
"id" => "contact_bank_links",
|
364 |
"title" => "<img src=\"".CONTACT_BK_PLUGIN_URL."/assets/images/icon.png\" width=\"25\" height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Contact Bank" ,
|
365 |
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
366 |
+
));
|
367 |
+
$wp_admin_bar->add_menu( array(
|
368 |
+
"parent" => "contact_bank_links",
|
369 |
+
"id" => "dashboard_links",
|
370 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
371 |
+
"title" => __( "Dashboard", contact_bank) ) /* set the sub-menu name */
|
372 |
+
);
|
373 |
+
$wp_admin_bar->add_menu( array(
|
374 |
+
"parent" => "contact_bank_links",
|
375 |
+
"id" => "short_code_links",
|
376 |
+
"href" => site_url() ."/wp-admin/admin.php?page=short_code",
|
377 |
+
"title" => __( "Short-Codes", contact_bank)) /* set the sub-menu name */
|
378 |
+
);
|
379 |
+
$wp_admin_bar->add_menu( array(
|
380 |
+
"parent" => "contact_bank_links",
|
381 |
+
"id" => "frontend_data_links",
|
382 |
+
"href" => site_url() ."/wp-admin/admin.php?page=frontend_data",
|
383 |
+
"title" => __( "Form Entries", contact_bank)) /* set the sub-menu name */
|
384 |
+
);
|
385 |
+
$wp_admin_bar->add_menu( array(
|
386 |
+
"parent" => "contact_bank_links",
|
387 |
+
"id" => "email_links",
|
388 |
+
"href" => site_url() ."/wp-admin/admin.php?page=contact_email",
|
389 |
+
"title" => __( "Email Settings", contact_bank) ) /* set the sub-menu name */
|
390 |
+
);
|
391 |
+
$wp_admin_bar->add_menu( array(
|
392 |
+
"parent" => "contact_bank_links",
|
393 |
+
"id" => "form_settings_data_links",
|
394 |
+
"href" => site_url() ."/wp-admin/admin.php?page=layout_settings",
|
395 |
+
"title" => __( "Global Settings", contact_bank)) /* set the sub-menu name */
|
396 |
+
);
|
397 |
+
$wp_admin_bar->add_menu( array(
|
398 |
+
"parent" => "contact_bank_links",
|
399 |
+
"id" => "system_status_data_links",
|
400 |
+
"href" => site_url() ."/wp-admin/admin.php?page=system_status",
|
401 |
+
"title" => __( "System Status", contact_bank)) /* set the sub-menu name */
|
402 |
+
);
|
403 |
+
$wp_admin_bar->add_menu( array(
|
404 |
+
"parent" => "contact_bank_links",
|
405 |
+
"id" => "pro_version_data_links",
|
406 |
+
"href" => site_url() ."/wp-admin/admin.php?page=pro_version",
|
407 |
+
"title" => __("Purchase PRO Edition", contact_bank)) /* set the sub-menu name */
|
408 |
+
);
|
409 |
+
break;
|
410 |
+
case "editor":
|
411 |
+
$wp_admin_bar->add_menu( array(
|
412 |
+
"id" => "contact_bank_links",
|
413 |
+
"title" => "<img src=\"".CONTACT_BK_PLUGIN_URL."/assets/images/icon.png\" width=\"25\" height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Contact Bank" ,
|
414 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
415 |
+
));
|
|
|
|
|
416 |
|
417 |
+
$wp_admin_bar->add_menu( array(
|
418 |
+
"parent" => "contact_bank_links",
|
419 |
+
"id" => "dashboard_links",
|
420 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
421 |
+
"title" => __( "Dashboard", contact_bank) ) /* set the sub-menu name */
|
422 |
+
);
|
423 |
+
$wp_admin_bar->add_menu( array(
|
424 |
+
"parent" => "contact_bank_links",
|
425 |
+
"id" => "short_code_links",
|
426 |
+
"href" => site_url() ."/wp-admin/admin.php?page=short_code",
|
427 |
+
"title" => __( "Short-Codes", contact_bank)) /* set the sub-menu name */
|
428 |
+
);
|
429 |
+
$wp_admin_bar->add_menu( array(
|
430 |
+
"parent" => "contact_bank_links",
|
431 |
+
"id" => "frontend_data_links",
|
432 |
+
"href" => site_url() ."/wp-admin/admin.php?page=frontend_data",
|
433 |
+
"title" => __( "Form Entries", contact_bank)) /* set the sub-menu name */
|
434 |
+
);
|
435 |
+
$wp_admin_bar->add_menu( array(
|
436 |
+
"parent" => "contact_bank_links",
|
437 |
+
"id" => "email_links",
|
438 |
+
"href" => site_url() ."/wp-admin/admin.php?page=contact_email",
|
439 |
+
"title" => __( "Email Settings", contact_bank) ) /* set the sub-menu name */
|
440 |
+
);
|
441 |
+
$wp_admin_bar->add_menu( array(
|
442 |
+
"parent" => "contact_bank_links",
|
443 |
+
"id" => "form_settings_data_links",
|
444 |
+
"href" => site_url() ."/wp-admin/admin.php?page=layout_settings",
|
445 |
+
"title" => __( "Global Settings", contact_bank)) /* set the sub-menu name */
|
446 |
+
);
|
447 |
+
|
448 |
+
|
449 |
+
$wp_admin_bar->add_menu( array(
|
450 |
+
"parent" => "contact_bank_links",
|
451 |
+
"id" => "system_status_data_links",
|
452 |
+
"href" => site_url() ."/wp-admin/admin.php?page=system_status",
|
453 |
+
"title" => __( "System Status", contact_bank)) /* set the sub-menu name */
|
454 |
+
);
|
455 |
+
$wp_admin_bar->add_menu( array(
|
456 |
+
"parent" => "contact_bank_links",
|
457 |
+
"id" => "pro_version_data_links",
|
458 |
+
"href" => site_url() ."/wp-admin/admin.php?page=pro_version",
|
459 |
+
"title" => __("Purchase PRO Edition", contact_bank)) /* set the sub-menu name */
|
460 |
+
);
|
461 |
+
break;
|
462 |
+
case "author":
|
463 |
+
$wp_admin_bar->add_menu( array(
|
464 |
+
"id" => "contact_bank_links",
|
465 |
+
"title" => "<img src=\"".CONTACT_BK_PLUGIN_URL."/assets/images/icon.png\" width=\"25\" height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Contact Bank" ,
|
466 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
467 |
+
));
|
468 |
+
|
469 |
+
$wp_admin_bar->add_menu( array(
|
470 |
+
"parent" => "contact_bank_links",
|
471 |
+
"id" => "dashboard_links",
|
472 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
473 |
+
"title" => __( "Dashboard", contact_bank) ) /* set the sub-menu name */
|
474 |
+
);
|
475 |
+
$wp_admin_bar->add_menu( array(
|
476 |
+
"parent" => "contact_bank_links",
|
477 |
+
"id" => "short_code_links",
|
478 |
+
"href" => site_url() ."/wp-admin/admin.php?page=short_code",
|
479 |
+
"title" => __( "Short-Codes", contact_bank)) /* set the sub-menu name */
|
480 |
+
);
|
481 |
+
$wp_admin_bar->add_menu( array(
|
482 |
+
"parent" => "contact_bank_links",
|
483 |
+
"id" => "frontend_data_links",
|
484 |
+
"href" => site_url() ."/wp-admin/admin.php?page=frontend_data",
|
485 |
+
"title" => __( "Form Entries", contact_bank)) /* set the sub-menu name */
|
486 |
+
);
|
487 |
+
$wp_admin_bar->add_menu( array(
|
488 |
+
"parent" => "contact_bank_links",
|
489 |
+
"id" => "email_links",
|
490 |
+
"href" => site_url() ."/wp-admin/admin.php?page=contact_email",
|
491 |
+
"title" => __( "Email Settings", contact_bank) ) /* set the sub-menu name */
|
492 |
+
);
|
493 |
+
$wp_admin_bar->add_menu( array(
|
494 |
+
"parent" => "contact_bank_links",
|
495 |
+
"id" => "form_settings_data_links",
|
496 |
+
"href" => site_url() ."/wp-admin/admin.php?page=layout_settings",
|
497 |
+
"title" => __( "Global Settings", contact_bank)) /* set the sub-menu name */
|
498 |
+
);
|
499 |
+
$wp_admin_bar->add_menu( array(
|
500 |
+
"parent" => "contact_bank_links",
|
501 |
+
"id" => "pro_version_data_links",
|
502 |
+
"href" => site_url() ."/wp-admin/admin.php?page=pro_version",
|
503 |
+
"title" => __("Purchase PRO Edition", contact_bank)) /* set the sub-menu name */
|
504 |
+
);
|
505 |
+
break;
|
506 |
+
case "contributor":
|
507 |
+
$wp_admin_bar->add_menu( array(
|
508 |
+
"id" => "contact_bank_links",
|
509 |
+
"title" => "<img src=\"".CONTACT_BK_PLUGIN_URL."/assets/images/icon.png\" width=\"25\" height=\"25\" style=\"vertical-align:text-top; margin-right:5px;\" />Contact Bank" ,
|
510 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
511 |
+
));
|
512 |
+
|
513 |
+
$wp_admin_bar->add_menu( array(
|
514 |
+
"parent" => "contact_bank_links",
|
515 |
+
"id" => "dashboard_links",
|
516 |
+
"href" => site_url() ."/wp-admin/admin.php?page=dashboard",
|
517 |
+
"title" => __( "Dashboard", contact_bank) ) /* set the sub-menu name */
|
518 |
+
);
|
519 |
+
$wp_admin_bar->add_menu( array(
|
520 |
+
"parent" => "contact_bank_links",
|
521 |
+
"id" => "short_code_links",
|
522 |
+
"href" => site_url() ."/wp-admin/admin.php?page=short_code",
|
523 |
+
"title" => __( "Short-Codes", contact_bank)) /* set the sub-menu name */
|
524 |
+
);
|
525 |
+
$wp_admin_bar->add_menu( array(
|
526 |
+
"parent" => "contact_bank_links",
|
527 |
+
"id" => "frontend_data_links",
|
528 |
+
"href" => site_url() ."/wp-admin/admin.php?page=frontend_data",
|
529 |
+
"title" => __( "Form Entries", contact_bank)) /* set the sub-menu name */
|
530 |
+
);
|
531 |
+
$wp_admin_bar->add_menu( array(
|
532 |
+
"parent" => "contact_bank_links",
|
533 |
+
"id" => "email_links",
|
534 |
+
"href" => site_url() ."/wp-admin/admin.php?page=contact_email",
|
535 |
+
"title" => __( "Email Settings", contact_bank) ) /* set the sub-menu name */
|
536 |
+
);
|
537 |
+
$wp_admin_bar->add_menu( array(
|
538 |
+
"parent" => "contact_bank_links",
|
539 |
+
"id" => "form_settings_data_links",
|
540 |
+
"href" => site_url() ."/wp-admin/admin.php?page=layout_settings",
|
541 |
+
"title" => __( "Global Settings", contact_bank)) /* set the sub-menu name */
|
542 |
+
);
|
543 |
+
$wp_admin_bar->add_menu( array(
|
544 |
+
"parent" => "contact_bank_links",
|
545 |
+
"id" => "pro_version_data_links",
|
546 |
+
"href" => site_url() ."/wp-admin/admin.php?page=pro_version",
|
547 |
+
"title" => __("Purchase PRO Edition", contact_bank)) /* set the sub-menu name */
|
548 |
+
);
|
549 |
+
break;
|
550 |
+
}
|
551 |
}
|
552 |
add_action( "media_buttons_context", "add_contact_shortcode_button", 1);
|
553 |
function add_contact_shortcode_button($context) {
|
lib/contact_bank_email-class.php
CHANGED
@@ -44,17 +44,37 @@ else
|
|
44 |
{
|
45 |
?>
|
46 |
<tr>
|
47 |
-
|
48 |
-
?>
|
49 |
<td ><?php echo $email_settings[$flag]->name;?></td>
|
50 |
<td ><?php echo $email_settings[$flag]->subject;?></td>
|
51 |
<td>
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
</td>
|
59 |
</tr>
|
60 |
<?php
|
44 |
{
|
45 |
?>
|
46 |
<tr>
|
47 |
+
|
|
|
48 |
<td ><?php echo $email_settings[$flag]->name;?></td>
|
49 |
<td ><?php echo $email_settings[$flag]->subject;?></td>
|
50 |
<td>
|
51 |
+
<?php
|
52 |
+
switch($cb_role)
|
53 |
+
{
|
54 |
+
case "administrator":
|
55 |
+
?>
|
56 |
+
<a href="admin.php?page=add_contact_email_settings&email_id=<?php echo $email_settings[$flag]->email_id;?>&form_id=<?php echo $form_id ?>" class="btn hovertip" data-original-title="<?php _e("Edit Email Settings",contact_bank)?>">
|
57 |
+
<i class="icon-pencil"></i>
|
58 |
+
</a>
|
59 |
+
<a herf="#" onclick="delete_email_settings(<?php echo $email_settings[$flag]->email_id;?>)" class="btn hovertip" data-original-title="<?php _e("Delete Email Settings",contact_bank)?>">
|
60 |
+
<i class="icon-trash"></i>
|
61 |
+
</a>
|
62 |
+
<?php
|
63 |
+
break;
|
64 |
+
case "editor":
|
65 |
+
?>
|
66 |
+
<a href="admin.php?page=add_contact_email_settings&email_id=<?php echo $email_settings[$flag]->email_id;?>&form_id=<?php echo $form_id ?>" class="btn hovertip" data-original-title="<?php _e("Edit Email Settings",contact_bank)?>">
|
67 |
+
<i class="icon-pencil"></i>
|
68 |
+
</a>
|
69 |
+
<a herf="#" onclick="delete_email_settings(<?php echo $email_settings[$flag]->email_id;?>)" class="btn hovertip" data-original-title="<?php _e("Delete Email Settings",contact_bank)?>">
|
70 |
+
<i class="icon-trash"></i>
|
71 |
+
</a>
|
72 |
+
<?php
|
73 |
+
break;
|
74 |
+
|
75 |
+
}
|
76 |
+
?>
|
77 |
+
|
78 |
</td>
|
79 |
</tr>
|
80 |
<?php
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank
|
|
3 |
Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact bank, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 3.9.1
|
6 |
-
Stable tag: 2.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -29,7 +29,7 @@ It provides a powerful engine for uploading and managing dynamic forms with more
|
|
29 |
|
30 |
***The Contact Bank WordPress Plugin is now proudly maintained by <a href="http://www.tech-banker.com">Tech Banker Pte Ltd.</a> since March 2014.***
|
31 |
|
32 |
-
***June
|
33 |
|
34 |
<a href="http://tech-banker.com/forum/contact-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
|
35 |
|
@@ -522,6 +522,10 @@ In order to set Shortcode for a Form, you need to follow these steps :
|
|
522 |
|
523 |
== Changelog ==
|
524 |
|
|
|
|
|
|
|
|
|
525 |
= 2.0.34 =
|
526 |
|
527 |
* Few Bugs Fixed
|
3 |
Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact bank, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 3.9.1
|
6 |
+
Stable tag: 2.0.35
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
29 |
|
30 |
***The Contact Bank WordPress Plugin is now proudly maintained by <a href="http://www.tech-banker.com">Tech Banker Pte Ltd.</a> since March 2014.***
|
31 |
|
32 |
+
***June 19, 2014: We're happy to announce that Contact Bank reached 44,950+ plugin downloads in only 10 months. We frequently receive positive feedback from people using our Contact Bank Plugin for WordPress. Thanks so much for your support!***
|
33 |
|
34 |
<a href="http://tech-banker.com/forum/contact-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
|
35 |
|
522 |
|
523 |
== Changelog ==
|
524 |
|
525 |
+
= 2.0.35 =
|
526 |
+
|
527 |
+
* Bug Fixed with Menu Links shown to Subscriber and other roles.
|
528 |
+
|
529 |
= 2.0.34 =
|
530 |
|
531 |
* Few Bugs Fixed
|
views/dashboard.php
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
<?php
|
2 |
-
global $wpdb;
|
|
|
|
|
|
|
3 |
$last_form_id = $wpdb->get_var
|
4 |
(
|
5 |
"SELECT form_id FROM " .contact_bank_contact_form(). " order by form_id desc limit 1"
|
@@ -90,18 +93,50 @@ if($popup == "")
|
|
90 |
(
|
91 |
"SELECT count(form_id) FROM ".contact_bank_contact_form()
|
92 |
);
|
93 |
-
|
94 |
{
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
?>
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
<a class="btn btn-danger" href="#"
|
106 |
onclick="restore_factory_settings();"><?php _e("Restore Factory Settings", contact_bank); ?>
|
107 |
</a>
|
@@ -155,11 +190,30 @@ if($popup == "")
|
|
155 |
<?php echo $total_control;?>
|
156 |
</td>
|
157 |
<td>
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
<a href="admin.php?page=layout_settings&form_id=<?php echo $form_data[$flag]->form_id; ?>"
|
164 |
class="btn hovertip"
|
165 |
data-original-title="<?php _e("Global Settings", contact_bank) ?>">
|
@@ -180,12 +234,32 @@ if($popup == "")
|
|
180 |
data-original-title="<?php _e("Form Preview", contact_bank) ?>">
|
181 |
<i class="icon-eye-open"></i>
|
182 |
</a>
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
</td>
|
190 |
</tr>
|
191 |
<?php
|
1 |
<?php
|
2 |
+
global $wpdb,$current_user;
|
3 |
+
$role = $wpdb->prefix . "capabilities";
|
4 |
+
$current_user->role = array_keys($current_user->$role);
|
5 |
+
$role = $current_user->role[0];
|
6 |
$last_form_id = $wpdb->get_var
|
7 |
(
|
8 |
"SELECT form_id FROM " .contact_bank_contact_form(). " order by form_id desc limit 1"
|
93 |
(
|
94 |
"SELECT count(form_id) FROM ".contact_bank_contact_form()
|
95 |
);
|
96 |
+
switch ($role)
|
97 |
{
|
98 |
+
case "administrator":
|
99 |
+
if($form_count < 1)
|
100 |
+
{
|
101 |
+
?>
|
102 |
+
<a class="btn btn-info"
|
103 |
+
href="admin.php?page=contact_bank&form_id=<?php echo $contact_id; ?>"><?php _e("Add New Form", contact_bank); ?>
|
104 |
+
</a>
|
105 |
+
<?php
|
106 |
+
}
|
107 |
+
break;
|
108 |
+
case "editor":
|
109 |
+
if($form_count < 1)
|
110 |
+
{
|
111 |
+
?>
|
112 |
+
<a class="btn btn-info"
|
113 |
+
href="admin.php?page=contact_bank&form_id=<?php echo $contact_id; ?>"><?php _e("Add New Form", contact_bank); ?>
|
114 |
+
</a>
|
115 |
+
<?php
|
116 |
+
}
|
117 |
+
break;
|
118 |
}
|
119 |
?>
|
120 |
+
<?php
|
121 |
+
switch ($role)
|
122 |
+
{
|
123 |
+
case "administrator":
|
124 |
+
?>
|
125 |
+
<a class="btn btn-info" href="#"
|
126 |
+
onclick="delete_forms();"><?php _e("Delete All Forms", contact_bank); ?>
|
127 |
+
</a>
|
128 |
+
<?php
|
129 |
+
break;
|
130 |
+
case "editor":
|
131 |
+
?>
|
132 |
+
<a class="btn btn-info" href="#"
|
133 |
+
onclick="delete_forms();"><?php _e("Delete All Forms", contact_bank); ?>
|
134 |
+
</a>
|
135 |
+
<?php
|
136 |
+
break;
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
|
140 |
<a class="btn btn-danger" href="#"
|
141 |
onclick="restore_factory_settings();"><?php _e("Restore Factory Settings", contact_bank); ?>
|
142 |
</a>
|
190 |
<?php echo $total_control;?>
|
191 |
</td>
|
192 |
<td>
|
193 |
+
<?php
|
194 |
+
switch ($role)
|
195 |
+
{
|
196 |
+
case "administrator":
|
197 |
+
?>
|
198 |
+
<a href="admin.php?page=contact_bank&form_id=<?php echo $form_data[$flag]->form_id; ?>"
|
199 |
+
class="btn hovertip"
|
200 |
+
data-original-title="<?php _e("Edit Form", contact_bank) ?>">
|
201 |
+
<i class="icon-pencil"></i>
|
202 |
+
</a>
|
203 |
+
<?php
|
204 |
+
break;
|
205 |
+
case "editor":
|
206 |
+
?>
|
207 |
+
<a href="admin.php?page=contact_bank&form_id=<?php echo $form_data[$flag]->form_id; ?>"
|
208 |
+
class="btn hovertip"
|
209 |
+
data-original-title="<?php _e("Edit Form", contact_bank) ?>">
|
210 |
+
<i class="icon-pencil"></i>
|
211 |
+
</a>
|
212 |
+
<?php
|
213 |
+
break;
|
214 |
+
}
|
215 |
+
?>
|
216 |
+
|
217 |
<a href="admin.php?page=layout_settings&form_id=<?php echo $form_data[$flag]->form_id; ?>"
|
218 |
class="btn hovertip"
|
219 |
data-original-title="<?php _e("Global Settings", contact_bank) ?>">
|
234 |
data-original-title="<?php _e("Form Preview", contact_bank) ?>">
|
235 |
<i class="icon-eye-open"></i>
|
236 |
</a>
|
237 |
+
<?php
|
238 |
+
switch ($role)
|
239 |
+
{
|
240 |
+
case "administrator":
|
241 |
+
?>
|
242 |
+
<a herf="#"
|
243 |
+
onclick="delete_form(<?php echo $form_data[$flag]->form_id; ?>);"
|
244 |
+
class="btn hovertip"
|
245 |
+
data-original-title="<?php _e("Delete Form", contact_bank) ?>">
|
246 |
+
<i class="icon-trash"></i>
|
247 |
+
</a>
|
248 |
+
<?php
|
249 |
+
break;
|
250 |
+
case "editor":
|
251 |
+
?>
|
252 |
+
<a herf="#"
|
253 |
+
onclick="delete_form(<?php echo $form_data[$flag]->form_id; ?>);"
|
254 |
+
class="btn hovertip"
|
255 |
+
data-original-title="<?php _e("Delete Form", contact_bank) ?>">
|
256 |
+
<i class="icon-trash"></i>
|
257 |
+
</a>
|
258 |
+
<?php
|
259 |
+
break;
|
260 |
+
}
|
261 |
+
?>
|
262 |
+
|
263 |
</td>
|
264 |
</tr>
|
265 |
<?php
|
views/header.php
CHANGED
@@ -14,7 +14,12 @@ if($show_banner == "")
|
|
14 |
<a class="button gb_message_buttons" target="_blank" href="http://tech-banker.com/contact-bank/">UPGRADE NOW</a>
|
15 |
</div>
|
16 |
</div>';
|
|
|
17 |
}
|
|
|
|
|
|
|
|
|
18 |
$cb_lang = array();
|
19 |
$cb_lang_translated_languages = array();
|
20 |
array_push($cb_lang_translated_languages,"fr_FR","ru_RU","en_US","es_ES", "nl_NL","hu_HU","de_DE", "pt_BR", "pt_PT","et","he_IL", "tr","it_IT", "da_DK");
|
@@ -29,16 +34,59 @@ jQuery(document).ready(function()
|
|
29 |
});
|
30 |
</script>
|
31 |
<img style="margin: 10px;" src="<?php echo CONTACT_BK_PLUGIN_URL .'/assets/images/cb-logo.png';?>"/>
|
32 |
-
<h2 class="nav-tab-wrapper">
|
33 |
-
<a class="nav-tab " id="dashboard" href="admin.php?page=dashboard">Dashboard</a>
|
34 |
-
<a class="nav-tab " id="short_code" href="admin.php?page=short_code">Short-Codes</a>
|
35 |
-
<a class="nav-tab " id="frontend_data" href="admin.php?page=frontend_data">Form Entries</a>
|
36 |
-
<a class="nav-tab " id="contact_email" href="admin.php?page=contact_email">Email Settings</a>
|
37 |
-
<a class="nav-tab " id="layout_settings" href="admin.php?page=layout_settings">Global Settings</a>
|
38 |
-
<a class="nav-tab " id="system_status" href="admin.php?page=system_status">System Status</a>
|
39 |
-
<a class="nav-tab " id="pro_version" href="admin.php?page=pro_version">Purchase Pro Version</a>
|
40 |
-
</h2>
|
41 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
if(in_array($cb_language, $cb_lang))
|
43 |
{
|
44 |
?>
|
14 |
<a class="button gb_message_buttons" target="_blank" href="http://tech-banker.com/contact-bank/">UPGRADE NOW</a>
|
15 |
</div>
|
16 |
</div>';
|
17 |
+
|
18 |
}
|
19 |
+
global $wpdb,$current_user;
|
20 |
+
$role = $wpdb->prefix . "capabilities";
|
21 |
+
$current_user->role = array_keys($current_user->$role);
|
22 |
+
$role = $current_user->role[0];
|
23 |
$cb_lang = array();
|
24 |
$cb_lang_translated_languages = array();
|
25 |
array_push($cb_lang_translated_languages,"fr_FR","ru_RU","en_US","es_ES", "nl_NL","hu_HU","de_DE", "pt_BR", "pt_PT","et","he_IL", "tr","it_IT", "da_DK");
|
34 |
});
|
35 |
</script>
|
36 |
<img style="margin: 10px;" src="<?php echo CONTACT_BK_PLUGIN_URL .'/assets/images/cb-logo.png';?>"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
<?php
|
38 |
+
switch ($role) {
|
39 |
+
case "administrator":
|
40 |
+
?>
|
41 |
+
<h2 class="nav-tab-wrapper">
|
42 |
+
<a class="nav-tab " id="dashboard" href="admin.php?page=dashboard">Dashboard</a>
|
43 |
+
<a class="nav-tab " id="short_code" href="admin.php?page=short_code">Short-Codes</a>
|
44 |
+
<a class="nav-tab " id="frontend_data" href="admin.php?page=frontend_data">Form Entries</a>
|
45 |
+
<a class="nav-tab " id="contact_email" href="admin.php?page=contact_email">Email Settings</a>
|
46 |
+
<a class="nav-tab " id="layout_settings" href="admin.php?page=layout_settings">Global Settings</a>
|
47 |
+
<a class="nav-tab " id="system_status" href="admin.php?page=system_status">System Status</a>
|
48 |
+
<a class="nav-tab " id="pro_version" href="admin.php?page=pro_version">Purchase Pro Version</a>
|
49 |
+
</h2>
|
50 |
+
<?php
|
51 |
+
break;
|
52 |
+
case "editor":
|
53 |
+
?>
|
54 |
+
<h2 class="nav-tab-wrapper">
|
55 |
+
<a class="nav-tab " id="dashboard" href="admin.php?page=dashboard">Dashboard</a>
|
56 |
+
<a class="nav-tab " id="short_code" href="admin.php?page=short_code">Short-Codes</a>
|
57 |
+
<a class="nav-tab " id="frontend_data" href="admin.php?page=frontend_data">Form Entries</a>
|
58 |
+
<a class="nav-tab " id="contact_email" href="admin.php?page=contact_email">Email Settings</a>
|
59 |
+
<a class="nav-tab " id="layout_settings" href="admin.php?page=layout_settings">Global Settings</a>
|
60 |
+
<a class="nav-tab " id="system_status" href="admin.php?page=system_status">System Status</a>
|
61 |
+
<a class="nav-tab " id="pro_version" href="admin.php?page=pro_version">Purchase Pro Version</a>
|
62 |
+
</h2>
|
63 |
+
<?php
|
64 |
+
break;
|
65 |
+
case "author":
|
66 |
+
?>
|
67 |
+
<h2 class="nav-tab-wrapper">
|
68 |
+
<a class="nav-tab " id="dashboard" href="admin.php?page=dashboard">Dashboard</a>
|
69 |
+
<a class="nav-tab " id="short_code" href="admin.php?page=short_code">Short-Codes</a>
|
70 |
+
<a class="nav-tab " id="frontend_data" href="admin.php?page=frontend_data">Form Entries</a>
|
71 |
+
<a class="nav-tab " id="contact_email" href="admin.php?page=contact_email">Email Settings</a>
|
72 |
+
<a class="nav-tab " id="layout_settings" href="admin.php?page=layout_settings">Global Settings</a>
|
73 |
+
<a class="nav-tab " id="pro_version" href="admin.php?page=pro_version">Purchase Pro Version</a>
|
74 |
+
</h2>
|
75 |
+
<?php
|
76 |
+
break;
|
77 |
+
case "contributor":
|
78 |
+
?>
|
79 |
+
<h2 class="nav-tab-wrapper">
|
80 |
+
<a class="nav-tab " id="dashboard" href="admin.php?page=dashboard">Dashboard</a>
|
81 |
+
<a class="nav-tab " id="short_code" href="admin.php?page=short_code">Short-Codes</a>
|
82 |
+
<a class="nav-tab " id="frontend_data" href="admin.php?page=frontend_data">Form Entries</a>
|
83 |
+
<a class="nav-tab " id="contact_email" href="admin.php?page=contact_email">Email Settings</a>
|
84 |
+
<a class="nav-tab " id="layout_settings" href="admin.php?page=layout_settings">Global Settings</a>
|
85 |
+
<a class="nav-tab " id="pro_version" href="admin.php?page=pro_version">Purchase Pro Version</a>
|
86 |
+
</h2>
|
87 |
+
<?php
|
88 |
+
break;
|
89 |
+
}
|
90 |
if(in_array($cb_language, $cb_lang))
|
91 |
{
|
92 |
?>
|