| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: MxChat |
| 4 | 4 | * Description: AI Chatbot for WordPress with support for OpenAI, X.AI, and Claude models. Includes features like custom knowledge submission, chat transcripts, and seamless integration with WooCommerce. Perfect for blogs, business sites, e-commerce platforms, and more, offering real-time intelligent interactions with advanced AI models. |
| 5 | - * Version: 1.4 | |
| 5 | + * Version: 1.4.1 | |
| 6 | 6 | * Author: MxChat |
| 7 | 7 | * Author URI: https://mxchat.ai |
| 8 | 8 | * License: GPLv2 or later |
| 9 | 9 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| @@ -77,9 +77,9 @@ | ||
| 77 | 77 | // Set default thresholds for existing intents |
| 78 | 78 | $wpdb->query("UPDATE {$intents_table} SET similarity_threshold = 0.85 WHERE similarity_threshold IS NULL"); |
| 79 | 79 | |
| 80 | 80 | // Update plugin version in the database |
| 81 | - update_option('mxchat_plugin_version', '1.4'); | |
| 81 | + update_option('mxchat_plugin_version', '1.4.1'); | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | function mxchat_add_missing_columns($table, $column_name, $column_type) { |
| 85 | 85 | global $wpdb; |
| @@ -90,9 +90,9 @@ | ||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | function mxchat_check_for_update() { |
| 93 | 93 | $current_version = get_option('mxchat_plugin_version'); |
| 94 | - $plugin_version = '1.4'; | |
| 94 | + $plugin_version = '1.4.1'; | |
| 95 | 95 | |
| 96 | 96 | if ($current_version !== $plugin_version) { |
| 97 | 97 | mxchat_activate(); // Run the activation script which includes database migrations |
| 98 | 98 | update_option('mxchat_plugin_version', $plugin_version); // Update to the latest version |
| @@ -110,4 +110,10 @@ | ||
| 110 | 110 | $mxchat_admin = new MxChat_Admin(); |
| 111 | 111 | } |
| 112 | 112 | $mxchat_public = new MxChat_Public(); |
| 113 | 113 | $mxchat_integrator = new MxChat_Integrator(); |
| 114 | + | |
| 115 | + | |
| 116 | +// Define admin_post actions for form submission handling | |
| 117 | +add_action('admin_post_mxchat_add_intent', [ $mxchat_admin, 'mxchat_handle_add_intent' ]); | |
| 118 | +add_action('admin_post_mxchat_delete_intent', [ $mxchat_admin, 'mxchat_handle_delete_intent' ]); | |
| 119 | +add_action('admin_post_mxchat_update_intent_threshold', [ $mxchat_admin, 'mxchat_handle_update_intent_threshold' ]); | |