Plugin Directory

Changeset 2253009


Ignore:
Timestamp:
03/02/2020 02:30:10 PM (6 years ago)
Author:
snatchbot
Message:

Adding second version of my plugin

Location:
snatchbot-webchat/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • snatchbot-webchat/trunk/admin/admin.php

    r2218956 r2253009  
    9595                    "wp_user_id" => (int) $wp_user_id,
    9696                ));
     97                $user = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $table WHERE  wp_user_id = %d", $wp_user_id) );
    9798            }
    9899            $wp_esc_user = sbw_esc_checking_db($user[0]);
  • snatchbot-webchat/trunk/assets/js/embedCode.js

    r2218956 r2253009  
    11(function($) {
    2     const head = $("head")
    32    if (typeof snatchBot !== 'undefined') {
    4         head.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>')
     3        const footer = $("footer")
     4        const head = $("head")
     5        if(footer) {
     6            footer.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>')
     7        } else {
     8            head.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>')
     9        }
    510    } else {
    611        console.log("ERROR: doesn't given SnatchBot ID")
  • snatchbot-webchat/trunk/assets/js/embedCode.min.js

    r2218956 r2253009  
    1 !function(t){const n=jQuery("head");"undefined"!=typeof snatchBot?n.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>"):console.log("ERROR: doesn't given SnatchBot ID")}();
     1!function(t){if("undefined"!=typeof snatchBot){const n=t("footer"),o=t("head");n?n.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>"):o.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>")}else console.log("ERROR: doesn't given SnatchBot ID")}(jQuery);
  • snatchbot-webchat/trunk/client/client.php

    r2218956 r2253009  
    4949   
    5050        if (!empty($bot_id)) {
    51             wp_register_script('EmbedCode', 'https://account.snatchbot.me/script.js');
    52             wp_enqueue_script('SnatchEmbedCodeDeploy', $assetsPath['files']['embedCodeJS'], array('EmbedCode'), false, true );
     51            wp_register_script('EmbedCode', 'https://account.snatchbot.me/script.js', '', '', false );
     52            wp_enqueue_script('SnatchEmbedCodeDeploy', $assetsPath['files']['embedCodeJS'], array('EmbedCode'), '', true );
    5353            wp_localize_script( 'SnatchEmbedCodeDeploy' , 'snatchBot',
    5454                array('botID' => $bot_id)
  • snatchbot-webchat/trunk/includes/sbw-utility-functions.php

    r2218956 r2253009  
    8787        'images' => array(
    8888            'favicons'  => plugins_url( 'assets/img/favicons.png',  dirname(__FILE__) ),
    89             'preloader' => plugins_url( "assets/img/preloader.gif", dirname(__FILE__) ),
    90             'logo'      => plugins_url( "assets/img/logo.png",      dirname(__FILE__) ),
     89            'preloader' => plugins_url( 'assets/img/preloader.gif', dirname(__FILE__) ),
     90            'logo'      => plugins_url( 'assets/img/logo.png',      dirname(__FILE__) ),
    9191        ),
    9292        'files'  => array(
Note: See TracChangeset for help on using the changeset viewer.