Plugin Directory

Changeset 3399277


Ignore:
Timestamp:
11/19/2025 08:35:37 PM (5 months ago)
Author:
ailiveagents
Message:

version 1.0.1

Location:
ai-live-agents/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ai-live-agents/trunk/ai-live-agents.php

    r3399084 r3399277  
    33 * Plugin Name: AI Live Agents
    44 * Description: Add an AI-powered customer support assistant to your WordPress site
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Author URI: https://ailiveagents.com
    77 * License: GPL v2 or later
     
    1515
    1616// Plugin constants
    17 define('AILIVEAGENTS_VERSION', '1.0.0');
     17define('AILIVEAGENTS_VERSION', '1.0.1');
    1818define('AILIVEAGENTS_PLUGIN_DIR', plugin_dir_path(__FILE__));
    1919define('AILIVEAGENTS_PLUGIN_URL', plugin_dir_url(__FILE__));
     
    6868            'sanitize_callback' => 'sanitize_text_field',
    6969            'default' => ''
    70         ));
    71        
    72         register_setting('ailiveagents_settings', 'ailiveagents_enabled', array(
    73             'type' => 'boolean',
    74             'sanitize_callback' => 'rest_sanitize_boolean',
    75             'default' => true
    7670        ));
    7771       
     
    139133                    </tr>
    140134                   
    141                     <tr>
    142                         <th scope="row">
    143                             <label for="aila_enabled"><?php esc_html_e('Enable Widget', 'ai-live-agents'); ?></label>
    144                         </th>
    145                         <td>
    146                             <label>
    147                                 <input type="checkbox"
    148                                        id="aila_enabled"
    149                                        name="aila_enabled"
    150                                        value="1"
    151                                        <?php checked(1, get_option('aila_enabled', 1), true); ?>>
    152                                 <?php esc_html_e('Display the AI chat widget on your website', 'ai-live-agents'); ?>
    153                             </label>
    154                         </td>
    155                     </tr>
     135
    156136                   
    157137                    <tr>
     
    180160                <h2><?php esc_html_e('Manual Placement (Optional)', 'ai-live-agents'); ?></h2>
    181161                <p><?php esc_html_e('You can also place the widget manually on specific pages using the shortcode:', 'ai-live-agents'); ?></p>
    182                 <code style="background: #fff; padding: 10px; display: inline-block; border-radius: 4px;">[ai_live_agent]</code>
     162                <code style="background: #fff; padding: 10px; display: inline-block; border-radius: 4px;">[ailiveagents_widget]</code>
    183163                <p style="margin-top: 15px;">
    184164                    <strong><?php esc_html_e('Note:', 'ai-live-agents'); ?></strong>
    185                     <?php esc_html_e('When using the shortcode, make sure to disable "Enable Widget" above to avoid duplicate widgets.', 'ai-live-agents'); ?>
     165                    <?php esc_html_e('When using the shortcode, the widget will appear both via the shortcode and automatically on all pages (unless excluded).', 'ai-live-agents'); ?>
    186166                </p>
    187167            </div>
     
    200180   
    201181    public function enqueue_scripts() {
    202         // Check if widget is enabled
    203         if (!get_option('ailiveagents_enabled', 1)) {
    204             return;
    205         }
    206        
    207182        $bot_id = get_option('ailiveagents_bot_id');
    208183       
     
    272247   
    273248    public function render_widget() {
    274         // Check if widget is enabled
    275         if (!get_option('ailiveagents_enabled', 1)) {
    276             return;
    277         }
    278        
    279249        $bot_id = get_option('ailiveagents_bot_id');
    280250       
     
    381351
    382352// Activation hook
    383 register_activation_hook(__FILE__, 'aila_activate');
    384 function aila_activate() {
     353register_activation_hook(__FILE__, 'ailiveagents_activate');
     354function ailiveagents_activate() {
    385355    // Set default options
    386     add_option('aila_enabled', 1);
    387     add_option('aila_bot_id', '');
    388     add_option('aila_exclude_pages', '');
     356    add_option('ailiveagents_bot_id', '');
     357    add_option('ailiveagents_exclude_pages', '');
    389358}
    390359
    391360// Deactivation hook
    392 register_deactivation_hook(__FILE__, 'aila_deactivate');
    393 function aila_deactivate() {
     361register_deactivation_hook(__FILE__, 'ailiveagents_deactivate');
     362function ailiveagents_deactivate() {
    394363    // Cleanup if needed
    395364}
    396365
    397366// Uninstall hook
    398 register_uninstall_hook(__FILE__, 'aila_uninstall');
    399 function aila_uninstall() {
     367register_uninstall_hook(__FILE__, 'ailiveagents_uninstall');
     368function ailiveagents_uninstall() {
    400369    // Remove all options
    401     delete_option('aila_bot_id');
    402     delete_option('aila_enabled');
    403     delete_option('aila_exclude_pages');
    404 }
     370    delete_option('ailiveagents_bot_id');
     371    delete_option('ailiveagents_exclude_pages');
     372}
  • ai-live-agents/trunk/readme.txt

    r3399077 r3399277  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.