Plugin Directory

Changeset 3463766


Ignore:
Timestamp:
02/17/2026 07:11:20 PM (6 weeks ago)
Author:
guestchat
Message:

Tagging version 1.0.7

Location:
guestchat-bot
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • guestchat-bot/tags/1.0.8/guestchat.php

    r3107370 r3463766  
    44    Description: Activate the Guestchat Bot on your wordpress site
    55    Author: Guestchat
    6     Version: 1.1
     6    Version: 1.0.8
    77    */
    88
    99    // Shortcode function
    10     function guestchat_showbot_shortcode() {
    11         $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
    12         $client_key = $guestchat_settings_options['client_key_0']; // Client Key
    13         $gc_element_code = '<chat-widget key="' . $client_key . '"></chat-widget>';
    14         echo $gc_element_code;
     10    function guestchat_showbot_shortcode($atts, $content = null) {   
     11        $attributes = shortcode_atts(array('key' => ''),$atts);
     12       
     13        // Use shortcode key if provided, otherwise get from settings
     14        if (!empty($atts['key'])) {
     15            $client_key = $atts['key'];
     16        } else {
     17            $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
     18            $client_key = $guestchat_settings_options['client_key_0']; // Client Key
     19        }
     20
     21        $gc_element_code = '<chat-widget type="module" key="' . $client_key . '"></chat-widget>';
     22        return $gc_element_code;
     23
    1524    }
    1625       
    1726    function guestchat_add_all_pages( $content) {
     27        // Don't add if shortcode is already used on this page
     28        if (has_shortcode($content, 'guestchat-bot')) {
     29            return $content;
     30        }
     31       
    1832        $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
    1933        $client_key = $guestchat_settings_options['client_key_0']; // Client Key
    20         $gc_element_code = '<chat-widget key="' . $client_key . '"></chat-widget>';
     34        $gc_element_code = '<chat-widget type="module" key="' . $client_key . '"></chat-widget>';
    2135
    2236        $content .= $gc_element_code;
  • guestchat-bot/tags/1.0.8/readme.txt

    r3269143 r3463766  
    33Tags: hotel, bot, guestchat,
    44Requires at least: 4.7
    5 Tested up to: 6.7.2
    6 Stable tag: 1.0.7
     5Tested up to: 6.9.1
     6Stable tag: 1.0.8
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    5555= 1.0.7 =
    5656* Version bump
     57= 1.0.8 =
     58* Ability to add a key on a shortcode
    5759
    5860
  • guestchat-bot/trunk/guestchat.php

    r3107370 r3463766  
    44    Description: Activate the Guestchat Bot on your wordpress site
    55    Author: Guestchat
    6     Version: 1.1
     6    Version: 1.0.8
    77    */
    88
    99    // Shortcode function
    10     function guestchat_showbot_shortcode() {
    11         $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
    12         $client_key = $guestchat_settings_options['client_key_0']; // Client Key
    13         $gc_element_code = '<chat-widget key="' . $client_key . '"></chat-widget>';
    14         echo $gc_element_code;
     10    function guestchat_showbot_shortcode($atts, $content = null) {   
     11        $attributes = shortcode_atts(array('key' => ''),$atts);
     12       
     13        // Use shortcode key if provided, otherwise get from settings
     14        if (!empty($atts['key'])) {
     15            $client_key = $atts['key'];
     16        } else {
     17            $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
     18            $client_key = $guestchat_settings_options['client_key_0']; // Client Key
     19        }
     20
     21        $gc_element_code = '<chat-widget type="module" key="' . $client_key . '"></chat-widget>';
     22        return $gc_element_code;
     23
    1524    }
    1625       
    1726    function guestchat_add_all_pages( $content) {
     27        // Don't add if shortcode is already used on this page
     28        if (has_shortcode($content, 'guestchat-bot')) {
     29            return $content;
     30        }
     31       
    1832        $guestchat_settings_options = get_option( 'guestchat_settings_option_name' ); // Array of All Options
    1933        $client_key = $guestchat_settings_options['client_key_0']; // Client Key
    20         $gc_element_code = '<chat-widget key="' . $client_key . '"></chat-widget>';
     34        $gc_element_code = '<chat-widget type="module" key="' . $client_key . '"></chat-widget>';
    2135
    2236        $content .= $gc_element_code;
  • guestchat-bot/trunk/readme.txt

    r3269143 r3463766  
    33Tags: hotel, bot, guestchat,
    44Requires at least: 4.7
    5 Tested up to: 6.7.2
    6 Stable tag: 1.0.7
     5Tested up to: 6.9.1
     6Stable tag: 1.0.8
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    5555= 1.0.7 =
    5656* Version bump
     57= 1.0.8 =
     58* Ability to add a key on a shortcode
    5759
    5860
Note: See TracChangeset for help on using the changeset viewer.