- Allow the chat-widget to connect to multiple servers (e.g. development and production)
- Created a full session overview
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Plugin Name: EveAI Chat Widget
|
||||
Plugin URI: https://askeveai.com/
|
||||
Description: Integrates the EveAI chat interface into your WordPress site.
|
||||
Version: 1.4.1
|
||||
Version: 1.5.0
|
||||
Author: Josako, Pieter Laroy
|
||||
Author URI: https://askeveai.com/about/
|
||||
*/
|
||||
@@ -28,7 +28,8 @@ function eveai_chat_shortcode($atts) {
|
||||
'api_key' => '',
|
||||
'domain' => '',
|
||||
'language' => 'en',
|
||||
'supported_languages' => 'en,fr,de,es'
|
||||
'supported_languages' => 'en,fr,de,es',
|
||||
'server_url' => 'https://evie.askeveai.com'
|
||||
);
|
||||
|
||||
// Merge provided attributes with defaults
|
||||
@@ -40,6 +41,7 @@ function eveai_chat_shortcode($atts) {
|
||||
$domain = esc_url_raw($atts['domain']);
|
||||
$language = sanitize_text_field($atts['language']);
|
||||
$supported_languages = sanitize_text_field($atts['supported_languages']);
|
||||
$server_url = esc_url_raw($atts['server_url']);
|
||||
|
||||
// Generate a unique ID for this instance of the chat widget
|
||||
$chat_id = 'chat-container-' . uniqid();
|
||||
@@ -52,7 +54,8 @@ function eveai_chat_shortcode($atts) {
|
||||
'$api_key',
|
||||
'$domain',
|
||||
'$language',
|
||||
'$supported_languages'
|
||||
'$supported_languages',
|
||||
'$server_url'
|
||||
);
|
||||
eveAI.initializeChat('$chat_id');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user