| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $current_user; |
| 7 |
if (!($current_user->ID)) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
|
| 11 |
$setting_action = isset($_REQUEST['setting_action']) ? sanitize_text_field($_REQUEST['setting_action']) : ''; |
| 12 |
|
| 13 |
switch ($setting_action) { |
| 14 |
|
| 15 |
case 'get_support_agents': include WPSC_ABSPATH . 'includes/admin/support_agents/get_support_agents.php'; |
| 16 |
break; |
| 17 |
|
| 18 |
case 'get_add_support_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/get_add_support_agent.php'; |
| 19 |
break; |
| 20 |
|
| 21 |
case 'get_users_add_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/get_users_add_agent.php'; |
| 22 |
break; |
| 23 |
|
| 24 |
case 'set_add_support_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/set_add_support_agent.php'; |
| 25 |
break; |
| 26 |
|
| 27 |
case 'get_edit_support_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/get_edit_support_agent.php'; |
| 28 |
break; |
| 29 |
|
| 30 |
case 'set_edit_support_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/set_edit_support_agent.php'; |
| 31 |
break; |
| 32 |
|
| 33 |
case 'delete_support_agent': include WPSC_ABSPATH . 'includes/admin/support_agents/delete_support_agent.php'; |
| 34 |
break; |
| 35 |
|
| 36 |
case 'get_agent_setting': include WPSC_ABSPATH . 'includes/admin/support_agents/get_agent_setting.php'; |
| 37 |
break; |
| 38 |
|
| 39 |
case 'set_agent_setting': include WPSC_ABSPATH . 'includes/admin/support_agents/set_agent_setting.php'; |
| 40 |
break; |
| 41 |
|
| 42 |
default: |
| 43 |
_e('Invalid Action','supportcandy'); |
| 44 |
break; |
| 45 |
|
| 46 |
} |
| 47 |
|