At Offroad Electrical & Marine, we specialise in dependable 12V and 24V electrical systems for your auto, off-road, caravan, canopy, and marine adventures across Brisbane to the Gold Coast. We’re committed to providing high-quality, reliable power solutions that you can trust, wherever your journey takes you. Let us ensure your electrical systems are safe, efficient, and ready for anything.
We offer a comprehensive range of specialised electrical services designed to meet the unique demands of your vehicle or vessel. Our approach focuses on understanding your needs, then delivering effective and practical solutions that last.
Auto & off-road
From lithium battery upgrades and dual battery systems to accessory wiring for fridges, lights, and water pumps, we ensure your auto, off-road, caravan, or canopy is powered reliably.
Marine electrical
Our marine services include house battery bank upgrades, advanced charging systems, inverter installs, navigation lighting, and thorough fault finding for your vessel.
Plugin Name: AI Chatbot - Jotform
* Plugin URI: http://wordpress.org/plugins/jotform-ai-chatbot/
* Description: AI chatbot that automates support, answers FAQs, drives WooCommerce sales, generates leads, and boosts engagement — easy setup, no coding!
* Author: Jotform
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Version: 3.6.4
* Author URI: https://www.jotform.com/
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit(0);
}
// Define plugin constants for main file, directory path, and URL
define('JAIC_PLUGIN_VERSION', '3.6.4');
define('JAIC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('JAIC_PLUGIN_URL', plugin_dir_url(__FILE__));
/**
* Enqueue admin scripts and styles for the plugin
*/
function jotform_ai_chatbot_admin_enqueue($hook) {
$allowed_pages = [
'toplevel_page_jotform_ai_chatbot',
'jotform-ai-chatbot_page_jotform_ai_chatbot_conversations',
'jotform-ai-chatbot_page_jotform_ai_chatbot_settings'
];
if (!in_array($hook, $allowed_pages)) {
return;
}
$isDevEnv = isset($_SERVER["SERVER_NAME"]) && $_SERVER["SERVER_NAME"] === "localhost";
$buildDir = $isDevEnv ? "dist" : "lib";
// Required WP script
wp_enqueue_script('wp-date');
// Main plugin assets
wp_enqueue_script(
"plugin-script",
JAIC_PLUGIN_URL . "{$buildDir}/app/app.js",
[],
JAIC_PLUGIN_VERSION,
true
);
// Main plugin css
$css_path = plugin_dir_path(__FILE__) . "{$buildDir}/app/app.css";
if (file_exists($css_path)) {
$custom_css = file_get_contents($css_path);
wp_register_style('jotform-ai-chatbot-style', false, [], JAIC_PLUGIN_VERSION);
wp_enqueue_style('jotform-ai-chatbot-style');
wp_add_inline_style('jotform-ai-chatbot-style', $custom_css);
}
// Preloader script
wp_enqueue_script(
"plugin-preloader-script",
JAIC_PLUGIN_URL . "lib/admin.js",
[],
JAIC_PLUGIN_VERSION,
true
);
}
add_action("admin_enqueue_scripts", "jotform_ai_chatbot_admin_enqueue");
/**
* Callback Function for Developers Section
*
* Renders the plugin interface within the WordPress admin settings page.
* Initializes JavaScript environment variables required for the plugin.
*/
function jotform_ai_chatbot_developers_callback($args) {
global $jaic_core;
// Set Page WP Nounce Fields
wp_nonce_field("jotform-ai-chatbot", "_nonce");
?>
Help us understand why you’re deactivating. Your feedback makes us better.
"wordpress",
"domain" => $domain,
"action" => $action . "_V2"
];
// Request params
$args = [
"method" => "POST",
"body" => wp_json_encode($payload),
"headers" => [
"Content-Type" => "application/json"
]
];
// Add the API Key if already generated
$options = get_option("jotform_ai_chatbot_options");
$options = !empty($options) ? json_decode($options, true) : [];
if (isset($options["apiKey"]) && !empty($options["apiKey"])) {
$args["headers"]["APIKEY"] = $options["apiKey"];
}
// Make the request
wp_remote_request($url, $args);
}
/**
* Hook into plugin activation to initialize the Jotform AI Chatbot plugin.
*
* This function checks if the currently activated plugin is this plugin itself.
* If so, it triggers the plugin initialization logic with the 'activated' status.
*
* @param string $plugin The path to the plugin being activated.
*/
function jaic_jotform_ai_plugin_activation($plugin) {
if ($plugin === plugin_basename(__FILE__)) {
jotform_ai_chatbot_initialize_plugin('activated');
}
}
add_action('activated_plugin', 'jaic_jotform_ai_plugin_activation');
/**
* Hook into plugin deactivation to handle cleanup or state changes for the Jotform AI Chatbot plugin.
*
* This function checks if the currently deactivated plugin is this plugin itself.
* If so, it triggers the plugin deinitialization logic with the 'deactivated' status.
*
* @param string $plugin The path to the plugin being deactivated.
*/
function jaic_jotform_ai_plugin_deactivation($plugin) {
if ($plugin === plugin_basename(__FILE__)) {
jotform_ai_chatbot_initialize_plugin('deactivated');
wp_clear_scheduled_hook('jotform_ai_chatbot_cron_hook');
}
}
add_action('deactivated_plugin', 'jaic_jotform_ai_plugin_deactivation');
/**
* Hook into plugin uninstallation to perform final cleanup for the Jotform AI Chatbot plugin.
*
* This function checks if the plugin being uninstalled is this plugin.
* If so, it triggers the plugin cleanup logic with the 'uninstalled' status.
*
* @param string $plugin The path to the plugin being uninstalled.
*/
function jaic_jotform_ai_plugin_uninstallation($plugin) {
if ($plugin === plugin_basename(__FILE__)) {
jotform_ai_chatbot_initialize_plugin('uninstalled');
wp_clear_scheduled_hook('jotform_ai_chatbot_cron_hook');
}
}
register_uninstall_hook(__FILE__, 'jaic_jotform_ai_plugin_uninstallation');
/**
* Hook into plugin update to handle update-specific logic for the Jotform AI Chatbot plugin.
*
* This function listens for plugin update actions and checks if this plugin is among those being updated.
* If so, it triggers the plugin initialization logic with the 'updated' status.
*
* @param WP_Upgrader $upgrader_object The upgrader class handling the update process.
* @param array $options Array of update options, including 'action', 'type', and 'plugins'.
*/
function jaic_jotform_ai_plugin_updating($upgrader_object, $options) {
if ($options['action'] === 'update' && $options['type'] === 'plugin') {
$plugin_basename = plugin_basename(__FILE__);
foreach ($options['plugins'] as $plugin) {
if ($plugin === $plugin_basename) {
jotform_ai_chatbot_initialize_plugin('updated');
break;
}
}
}
}
add_action('upgrader_process_complete', 'jaic_jotform_ai_plugin_updating', 10, 2);
/**
* Initialize plugin settings for the Jotform AI Chatbot plugin.
*
* - Adds a permission check on `wp_loaded` to restrict access to administrators.
* - Registers the plugin settings with a custom sanitization callback.
* - Adds a settings section to the plugin's settings page in the WordPress admin.
*/
function jotform_ai_chatbot_plugin_settings_init() {
add_action("wp_loaded", function () {
if (!current_user_can("manage_options")) {
wp_die(esc_html(__("You do not have sufficient permissions to access this page.", "jotform-ai-chatbot")));
}
});
register_setting(
'jotform_ai_chatbot',
'jotform_ai_chatbot_options',
[
'type' => 'array',
'sanitize_callback' => 'jotform_ai_chatbot_sanitize_options',
]
);
add_settings_section(
"",
esc_html(__("Jotform AI Chatbot", "jotform-ai-chatbot")),
"jotform_ai_chatbot_developers_callback",
"jotform_ai_chatbot",
[
"before_section" => "
",
"after_section" => "
"
]
);
}
add_action("admin_init", "jotform_ai_chatbot_plugin_settings_init");
/**
* Sanitize Plugin Options
*
* Sanitizes the plugin options to ensure that only valid values are stored in the database.
*
* @param array|string $input The input value to sanitize.
* @return array|string The sanitized input value.
*/
function jotform_ai_chatbot_sanitize_options($input) {
if (is_array($input)) {
foreach ($input as $key => $value) {
$input[$key] = sanitize_text_field($value);
}
} else {
$input = sanitize_text_field($input);
}
return $input;
}
/**
* Render Plugin
*
* Displays the plugin's settings page in the admin dashboard.
*/
function jotform_ai_chatbot_render_plugin() {
global $jaic_core;
$jaic_core->createKnowledgeBase();
?>
";
echo esc_html(__("You are in Jotform AI Chatbot Preview Mode.", "jotform-ai-chatbot"));
echo "
";
}
}
add_action("wp_head", "jotform_ai_chatbot_show_preview_indicator");
/**
* Defines the `jotform_ai_chatbot_show_plugin` function to display the plugin.
* Uses the global `$jaic_core` object to call the `renderChatbot()` method and outputs the plugin's HTML content.
* Hooks the `jotform_ai_chatbot_show_plugin` function into the `wp_footer` action to ensure the plugin is added to the footer of the webpage.
* The `wp_footer` action is triggered just before the closing
Solutions you can trust
We solve common frustrations like flat batteries, messy wiring, and charging issues, providing you with systems that are reliable, easy to use, and built to last.
We stand apart through the exceptional quality of our installs and our thoughtful system design. We don't just 'hook stuff up'; we engineer reliable power solutions. We specialise in both off-road and marine 12V/24V systems, ensuring clean, tidy wiring with correct cable sizing, proper terminations, and full circuit protection for your safety. Every setup is meticulously labelled and documented, making it easy to use and troubleshoot. Our strong fault-finding skills mean we can fix messy or unreliable wiring from previous installs. We recommend and install only the right gear (Victron/Redarc compatible) to deliver a neat, reliable power system you can trust on the road or on the water.
Auto, off-road & caravan electrical
We provide comprehensive electrical services for your auto, off-road, caravan, and canopy needs, including: lithium battery upgrades & dual battery systems, DC-DC chargers + alternator/engine bay cabling, solar panels + MPPT regulator installs, inverters, 240V chargers (where applicable), accessory wiring for fridges, lights, water pumps, compressors, switch panels, fuse/relay blocks, circuit protection, trailer plug wiring, lighting faults, brake light issues, fault finding, rewires, cable tidy-ups and labelling.
Marine electrical solutions
For marine vessels, our expert services ensure reliable power on the water: house battery bank upgrades (AGM → Lithium), charging systems (alternator, solar, shore power), inverter/charger installs and upgrades, distribution boards, fusing, isolators, breakers, labelling, bilge pumps, nav/anchor lights, deck lighting, accessories, sounders/electronics power feeds and tidy wiring, fault finding, corrosion issues, rewires and clean-ups, and support for survey/compliance-related electrical upgrades (as required).