Plugin Directory

Changeset 3788741


Ignore:
Timestamp:
11/06/2026 09:27:31 PM (less than one hour ago)
Author:
aiofounderhq1
Message:

Release 1.0.1: setup screen after activation, setup reminder, assistants created even when the site cannot be read yet

Location:
aicofounderhq-chatbot
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • aicofounderhq-chatbot/tags/1.0.1/aicofounderhq-chatbot.php

    r3786289 r3788741  
    33 * Plugin Name:       AICoFounderHQ Chatbot
    44 * Description:       An AI chat assistant that answers your visitors from your own website content, day and night, and emails you every lead.
    5  * Version:           1.0.0
     5 * Version:           1.0.1
    66 * Requires at least: 6.3
    77 * Requires PHP:      7.4
    … …  
    1717}
    1818
    19 define( 'AICFC_VERSION', '1.0.0' );
     19define( 'AICFC_VERSION', '1.0.1' );
    2020define( 'AICFC_SERVICE', 'https://aicofounderhq.com' );
    2121
    … …  
    133133                                $settings['enabled']      = 1;
    134134                                update_option( 'aicfc_settings', $settings );
    135                                 set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is ready and the chat bubble is now live on your site. Check your email for your welcome message.', 'aicofounderhq-chatbot' ) ), 60 );
     135                                if ( ! empty( $body['pending_crawl'] ) ) {
     136                                        set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is live and will capture every lead. We could not read your site yet (this is normal for new, private or protected sites), so we will keep trying daily and email you when it knows your pages.', 'aicofounderhq-chatbot' ) ), 60 );
     137                                } else {
     138                                        set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is ready and the chat bubble is now live on your site. Check your email for your welcome message.', 'aicofounderhq-chatbot' ) ), 60 );
     139                                }
    136140                        } else {
    137141                                $msg = ! empty( $body['error'] ) ? sanitize_text_field( $body['error'] ) : __( 'Something went wrong. Please try again.', 'aicofounderhq-chatbot' );
    … …  
    141145                wp_safe_redirect( $back );
    142146                exit;
     147        }
     148);
     149
     150/**
     151 * After a single activation, open the setup screen so new users know the next step.
     152 */
     153register_activation_hook(
     154        __FILE__,
     155        function () {
     156                add_option( 'aicfc_activation_redirect', 1 );
     157        }
     158);
     159add_action(
     160        'admin_init',
     161        function () {
     162                if ( ! get_option( 'aicfc_activation_redirect' ) ) {
     163                        return;
     164                }
     165                delete_option( 'aicfc_activation_redirect' );
     166                if ( wp_doing_ajax() || isset( $_GET['activate-multi'] ) || ! current_user_can( 'manage_options' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     167                        return;
     168                }
     169                wp_safe_redirect( admin_url( 'options-general.php?page=aicofounderhq-chatbot' ) );
     170                exit;
     171        }
     172);
     173
     174/**
     175 * Until the assistant is created, remind admins on the Dashboard and Plugins screens only.
     176 */
     177add_action(
     178        'admin_notices',
     179        function () {
     180                if ( ! current_user_can( 'manage_options' ) ) {
     181                        return;
     182                }
     183                $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
     184                if ( ! $screen || ! in_array( $screen->id, array( 'dashboard', 'plugins' ), true ) ) {
     185                        return;
     186                }
     187                $settings = aicfc_settings();
     188                if ( ! empty( $settings['assistant_id'] ) ) {
     189                        return;
     190                }
     191                $url = admin_url( 'options-general.php?page=aicofounderhq-chatbot' );
     192                echo '<div class="notice notice-info"><p><strong>' . esc_html__( 'AICoFounderHQ Chatbot:', 'aicofounderhq-chatbot' ) . '</strong> ' . esc_html__( 'finish setup in about 30 seconds to put your AI assistant on your site.', 'aicofounderhq-chatbot' ) . ' <a href="' . esc_url( $url ) . '">' . esc_html__( 'Create my free assistant', 'aicofounderhq-chatbot' ) . '</a></p></div>';
    143193        }
    144194);
  • aicofounderhq-chatbot/tags/1.0.1/readme.txt

    r3788479 r3788741  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8888== Changelog ==
    8989
     90= 1.0.1 =
     91* After activation, the plugin opens its setup screen so you can create your assistant right away.
     92* A short setup reminder appears on the Dashboard and Plugins screens until your assistant is created.
     93* If your site cannot be read yet (new, private or protected sites), your assistant is still created and starts capturing leads, and we retry reading your site daily.
     94
    9095= 1.0.0 =
    9196* First release.
  • aicofounderhq-chatbot/trunk/aicofounderhq-chatbot.php

    r3786289 r3788741  
    33 * Plugin Name:       AICoFounderHQ Chatbot
    44 * Description:       An AI chat assistant that answers your visitors from your own website content, day and night, and emails you every lead.
    5  * Version:           1.0.0
     5 * Version:           1.0.1
    66 * Requires at least: 6.3
    77 * Requires PHP:      7.4
    … …  
    1717}
    1818
    19 define( 'AICFC_VERSION', '1.0.0' );
     19define( 'AICFC_VERSION', '1.0.1' );
    2020define( 'AICFC_SERVICE', 'https://aicofounderhq.com' );
    2121
    … …  
    133133                                $settings['enabled']      = 1;
    134134                                update_option( 'aicfc_settings', $settings );
    135                                 set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is ready and the chat bubble is now live on your site. Check your email for your welcome message.', 'aicofounderhq-chatbot' ) ), 60 );
     135                                if ( ! empty( $body['pending_crawl'] ) ) {
     136                                        set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is live and will capture every lead. We could not read your site yet (this is normal for new, private or protected sites), so we will keep trying daily and email you when it knows your pages.', 'aicofounderhq-chatbot' ) ), 60 );
     137                                } else {
     138                                        set_transient( 'aicfc_notice', array( 'success', __( 'Your assistant is ready and the chat bubble is now live on your site. Check your email for your welcome message.', 'aicofounderhq-chatbot' ) ), 60 );
     139                                }
    136140                        } else {
    137141                                $msg = ! empty( $body['error'] ) ? sanitize_text_field( $body['error'] ) : __( 'Something went wrong. Please try again.', 'aicofounderhq-chatbot' );
    … …  
    141145                wp_safe_redirect( $back );
    142146                exit;
     147        }
     148);
     149
     150/**
     151 * After a single activation, open the setup screen so new users know the next step.
     152 */
     153register_activation_hook(
     154        __FILE__,
     155        function () {
     156                add_option( 'aicfc_activation_redirect', 1 );
     157        }
     158);
     159add_action(
     160        'admin_init',
     161        function () {
     162                if ( ! get_option( 'aicfc_activation_redirect' ) ) {
     163                        return;
     164                }
     165                delete_option( 'aicfc_activation_redirect' );
     166                if ( wp_doing_ajax() || isset( $_GET['activate-multi'] ) || ! current_user_can( 'manage_options' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     167                        return;
     168                }
     169                wp_safe_redirect( admin_url( 'options-general.php?page=aicofounderhq-chatbot' ) );
     170                exit;
     171        }
     172);
     173
     174/**
     175 * Until the assistant is created, remind admins on the Dashboard and Plugins screens only.
     176 */
     177add_action(
     178        'admin_notices',
     179        function () {
     180                if ( ! current_user_can( 'manage_options' ) ) {
     181                        return;
     182                }
     183                $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
     184                if ( ! $screen || ! in_array( $screen->id, array( 'dashboard', 'plugins' ), true ) ) {
     185                        return;
     186                }
     187                $settings = aicfc_settings();
     188                if ( ! empty( $settings['assistant_id'] ) ) {
     189                        return;
     190                }
     191                $url = admin_url( 'options-general.php?page=aicofounderhq-chatbot' );
     192                echo '<div class="notice notice-info"><p><strong>' . esc_html__( 'AICoFounderHQ Chatbot:', 'aicofounderhq-chatbot' ) . '</strong> ' . esc_html__( 'finish setup in about 30 seconds to put your AI assistant on your site.', 'aicofounderhq-chatbot' ) . ' <a href="' . esc_url( $url ) . '">' . esc_html__( 'Create my free assistant', 'aicofounderhq-chatbot' ) . '</a></p></div>';
    143193        }
    144194);
  • aicofounderhq-chatbot/trunk/readme.txt

    r3788479 r3788741  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8888== Changelog ==
    8989
     90= 1.0.1 =
     91* After activation, the plugin opens its setup screen so you can create your assistant right away.
     92* A short setup reminder appears on the Dashboard and Plugins screens until your assistant is created.
     93* If your site cannot be read yet (new, private or protected sites), your assistant is still created and starts capturing leads, and we retry reading your site daily.
     94
    9095= 1.0.0 =
    9196* First release.
Note: See TracChangeset for help on using the changeset viewer.