Plugin Directory

Changeset 1758194


Ignore:
Timestamp:
11/03/2017 07:30:26 PM (8 years ago)
Author:
scottvavoom
Message:

Uses acobot default key for admin screen

Location:
wp-iclew
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-iclew/trunk/readme.txt

    r1757767 r1758194  
    32321. Install the plugin through the WordPress plugins screen directly, or upload the plugin files to the `/wp-content/plugins/wp-acobot` directory.
    33331. Activate the plugin through the **Settings->WP acobot** screen to configure the plugin
    34 1. Copy the **GID** and **Key** provided by acobot and save your settings.
     341. Copy the **Key** provided by acobot and save your settings.
    3535
    3636== Frequently Asked Questions ==
     
    3838= How do I activate the Agent? =
    3939
    40 After you create an account with acobot.ai, enter in your unique GID and Key.
     40After you create an account with acobot.ai, enter in your unique Key.
    4141
    4242= How do I use the plugin? =
     
    5151== Screenshots ==
    5252
    53 1. The settings screen. This is where you enter the acobot GID and Key. This screen also has a live demo of the Agent.
     531. The settings screen. This is where you enter the acobot Key. The admin screen also has a live demo of the Agent.
    54542. The Agent in action.
    5555
     
    8383Allow user to display Agent on all pages of the site.
    8484
    85 = 1.4.1 =
     85= 1.4.2 =
    8686
    8787Admininstration changes.
     
    8989== Learn More section ==
    9090
    91 Learn more about the assistant at [acobot.ai](https://acobot.ai/?ref=1072 "Link to the
    92 AI Agent provider")
     91Learn more about the assistant at [acobot.ai](https://acobot.ai/?ref=1072 "Link to the AI Agent provider")
    9392
    9493== How to Use ==
  • wp-iclew/trunk/wp-acobot.php

    r1757767 r1758194  
    44Plugin URI:   http://vavoomdesign.com/wordpress/scott/wp-acobot/
    55Description:  Add a sophisticated, customizable serivce Agent to your pages. Powered by acobot
    6 Version:      1.4.1
     6Version:      1.4.2
    77Author:       Scott Campbell
    88Author URI:   http://vavoomdesign.com/wordpress/scott
     
    7676       
    7777        if( (1 == $enb) && (1 == $showonall) && !empty($key) ) {
    78             $this::add_acobot_script( false );
    79         }
    80     }
    81    
    82     private function add_acobot_script( $admin = false ) {
     78            $this::add_acobot_script( $key );
     79        }
     80    }
     81   
     82    private function add_acobot_script( $key ) {
    8383        $url = self::ACOBOT_URL;
    84         $key = sanitize_text_field(get_option(self::OPT_KEY, '' ));
    8584
    8685        // 2017-10-26 appears to run fine without a key, uses demo
     
    103102        // show the assistant on the admin page
    104103        if( $hook == 'settings_page_wp-acobot-admin-slug' ) {
    105             $this::add_acobot_script( true );
     104            $key = '251040.R19bWEl2ztdedsXS'; // default key
     105            $this::add_acobot_script( $key );
    106106        }
    107107  }
     
    118118        // don't use if already  showing on all pages
    119119        if( (1 == $enb) && (0 == $showonall) && !empty($key) ) {
    120             $this::add_acobot_script( false );
     120            $this::add_acobot_script( $key );
    121121        }
    122122       
Note: See TracChangeset for help on using the changeset viewer.