PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 2.3.1
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v2.3.1
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / includes / admin / settings / get_rest_api_settings.php

get_rest_api_settings.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 2.3.1, at includes/admin/settings/get_rest_api_settings.php

41 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user;
7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;}
8 ?>
9
10 <h4 style="margin-bottom: 25px;">
11 <?php _e('REST API','supportcandy');?>
12 </h4>
13 <form id="wpsc_frm_rest_api_settings" method="post" action="javascript:wpsc_set_rest_api_settings();">
14
15 <div class="form-group">
16 <label for="wpsc_captcha"><?php _e('Allow REST API','supportcandy');?></label>
17 <p class="help-block"><?php _e("Enable or disable REST API for SupportCandy.","supportcandy");?></p>
18 <select class="form-control" name="wpsc_rest_api" id="wpsc_rest_api">
19 <?php
20 $wpsc_rest = get_option('wpsc_rest_api');
21 $selected = $wpsc_rest == '0' ? 'selected="selected"' : '';
22 echo '<option '.esc_attr($selected).' value="0">'.__('Disable','supportcandy').'</option>';
23 $selected = $wpsc_rest == '1' ? 'selected="selected"' : '';
24 echo '<option '.esc_attr($selected).' value="1">'.__('Enable','supportcandy').'</option>';
25 ?>
26 </select>
27 </div>
28
29 <div class="form-group" id="wpsc_rest_api_secret_key">
30 <label for="wpsc_rest_api_secret_key"><?php _e('Secret Key','supportcandy');?></label>
31 <p class="help-block"><?php _e("This will be required to authorize your api requests. Store this at safe place in your application so that it should not be accessible to public.","supportcandy");?></p>
32 <input type="text" class="form-control" name="wpsc_rest_api_secret_key" id="wpsc_rest_api_secret_key" value="<?php echo esc_attr(get_option('wpsc_rest_api_secret_key')); ?>">
33 </div>
34
35 <button type="submit" class="btn btn-success"><?php _e('Save Changes','supportcandy');?></button>
36 <img class="wpsc_submit_wait" style="display:none;" src="<?php echo esc_url(WPSC_PLUGIN_URL.'asset/images/[email protected]');?>">
37 <input type="hidden" name="action" value="wpsc_settings" />
38 <input type="hidden" name="setting_action" value="set_rest_api_settings" />
39 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('set_rest_api_settings')?>">
40 </form>
41