Plugin Directory

Changeset 3252966


Ignore:
Timestamp:
03/09/2025 09:53:12 PM (12 months ago)
Author:
chatdata
Message:

Bump version to 1.0.2

Location:
chat-data
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • chat-data/trunk/chat-data.php

    r3252659 r3252966  
    55 * Plugin URI: https://www.chat-data.com/
    66 * Description: Embed your Chat Data chatbot on any Wordpress site.
    7  * Version: 1.0.1
     7 * Version: 1.0.2
    88 * Author: Chat Data
    99 * Author URI: https://www.chat-data.com//
     
    9999    ";
    100100
    101     wp_register_style('chat_data_admin_styles', false, array(), '1.0.1');
     101    wp_register_style('chat_data_admin_styles', false, array(), '1.0.2');
    102102    wp_enqueue_style('chat_data_admin_styles');
    103103    wp_add_inline_style('chat_data_admin_styles', $css);
     
    152152
    153153// Embed the script on the site using the ID entered in the options page
    154 function chat_data_embed_chatbot()
    155 {
     154function chat_data_embed_chatbot() {
    156155    $chatbot_id = get_option('chatbot_id');
    157156    $embedding_domain = get_option('embedding_domain');
    158157
    159158    if ($chatbot_id && $embedding_domain) {
    160         $script_url = "https://{$embedding_domain}/embed.min.js?chatbotId={$chatbot_id}";
    161         // Register the script
    162         wp_register_script(
    163             'chatbot-script',
    164             $script_url,
    165             array(), // Dependencies (if any)
    166             '1.0.1', // Version number (replace with your actual script version)
    167             array(
    168                 'strategy'  => 'defer',
    169                 'in_footer' => true,
    170             )
    171         );
    172         wp_enqueue_script('chatbot-script');
     159        $script_url = esc_url("https://{$embedding_domain}/embed.min.js?chatbotId={$chatbot_id}");
     160        echo "<script defer src='{$script_url}'></script>\n";
    173161    }
    174162}
    175163
    176 add_action('wp_enqueue_scripts', 'chat_data_embed_chatbot', 99999);
     164add_action('wp_footer', 'chat_data_embed_chatbot', 99999);
    177165?>
  • chat-data/trunk/readme.txt

    r3252659 r3252966  
    3232== Changelog ==
    3333
     34= 1.0.2 =
     35* Change how the embedding script is loaded to ensure it loads after all other scripts.
     36
    3437= 1.0.1 =
    3538* Add priority to the embedding script to ensure it loads after all other scripts.
Note: See TracChangeset for help on using the changeset viewer.