'; echo '
Great news! We now offer a managed API service that eliminates the need for Supabase setup:
'; echo 'Your existing setup will continue to work perfectly. The new API option is available in '; echo 'Settings → AI Supabase '; echo 'when you\'re ready to upgrade.
'; echo ''; echo 'Learn More About API Service '; echo 'View Settings '; echo 'Dismiss'; echo '
'; echo ''; // Handle dismissal if (isset($_GET['aivesese_dismiss_upgrade']) && check_admin_referer('aivesese_upgrade_nonce')) { update_option('aivesese_upgrade_notice_dismissed', time()); wp_safe_redirect(remove_query_arg(['aivesese_dismiss_upgrade', '_wpnonce'])); exit; } } // Update version if (!$current_version || version_compare($current_version, AIVESESE_PLUGIN_VERSION, '<')) { update_option('aivesese_plugin_version', AIVESESE_PLUGIN_VERSION); } }); // Add plugin action links add_filter('plugin_action_links_' . plugin_basename(__FILE__), function($links) { $connection_mode = get_option('aivesese_connection_mode', 'self_hosted'); $settings_link = 'Settings'; $status_link = 'Status'; if ($connection_mode === 'api') { $mode_indicator = 'API Mode'; } else { $mode_indicator = 'Self-Hosted'; } array_unshift($links, $settings_link, $status_link, $mode_indicator); return $links; }); // Add plugin row meta add_filter('plugin_row_meta', function($links, $file) { if ($file === plugin_basename(__FILE__)) { $row_meta = [ 'docs' => 'Documentation', 'support' => 'Support', 'api_service' => '🚀 Get API Service' ]; return array_merge($links, $row_meta); } return $links; }, 10, 2); // Add admin body class for styling add_filter('admin_body_class', function($classes) { $screen = get_current_screen(); if ($screen && strpos($screen->id, 'aivesese') !== false) { $connection_mode = get_option('aivesese_connection_mode', 'self_hosted'); $classes .= ' aivesese-admin aivesese-mode-' . $connection_mode; } return $classes; }); add_action('plugins_loaded', function() { $current_version = get_option('aivesese_plugin_version', '0'); if (version_compare($current_version, AIVESESE_PLUGIN_VERSION, '<')) { // Plugin was updated, run database updates aivesese_update_database(); update_option('aivesese_plugin_version', AIVESESE_PLUGIN_VERSION); } }); function aivesese_update_database() { // Create/update analytics table $analytics = AIVectorSearch_Analytics::instance(); $analytics->create_table(); // Any other database updates for future versions // if (version_compare($old_version, '0.17.0', '<')) { // // Run updates for version 0.17.0 // } }