diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7dd11b6..1b0a69d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,11 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: Add SSH Key + run: | + mkdir $HOME/.ssh + echo "$SSH_KEY" > "$HOME/.ssh/key" + chmod 600 "$HOME/.ssh/key" - name: Install composer deps run: composer install --no-dev --prefer-dist --no-progress --no-suggest - name: Install npm deps @@ -20,33 +25,8 @@ jobs: run: npm run build - name: Build zip run: npm run dist - - name: Upload Latest Version to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@master env: - AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }} - AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' # optional: defaults to us-east-1 - SOURCE_DIR: 'artifact' # optional: defaults to entire repository - DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/hyve-lite/latest - - name: Upload Tagged Version to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete - env: - AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }} - AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' # optional: defaults to us-east-1 - SOURCE_DIR: 'artifact' # optional: defaults to entire repository - DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/hyve-lite/$BUILD_VERSION - - name: Send update to the store - env: - PRODUCT_ID: ${{ secrets.THEMEISLE_ID }} - AUTH_TOKEN: ${{ secrets.THEMEISLE_STORE_AUTH }} - STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }} - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }} - uses: Codeinwp/action-store-release@main + SVN_PASSWORD: ${{ secrets.SVN_THEMEISLE_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_THEMEISLE_USERNAME }} \ No newline at end of file diff --git a/.wordpress-org/screenshot-01.png b/.wordpress-org/screenshot-01.png new file mode 100644 index 0000000..0ea81f7 Binary files /dev/null and b/.wordpress-org/screenshot-01.png differ diff --git a/.wordpress-org/screenshot-02.png b/.wordpress-org/screenshot-02.png new file mode 100644 index 0000000..235d017 Binary files /dev/null and b/.wordpress-org/screenshot-02.png differ diff --git a/.wordpress-org/screenshot-03.png b/.wordpress-org/screenshot-03.png new file mode 100644 index 0000000..19ca52c Binary files /dev/null and b/.wordpress-org/screenshot-03.png differ diff --git a/.wordpress-org/screenshot-04.png b/.wordpress-org/screenshot-04.png new file mode 100644 index 0000000..114f05c Binary files /dev/null and b/.wordpress-org/screenshot-04.png differ diff --git a/Gruntfile.js b/Gruntfile.js index dc97d83..027f21a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -30,6 +30,14 @@ module.exports = function( grunt ) { flags: '' }, src: [ 'hyve-lite.php' ] + }, + readmetxt: { + options: { + prefix: 'Stable tag:\\s*' + }, + src: [ + 'readme.txt' + ] } } } diff --git a/artifact/hyve-lite.zip b/artifact/hyve-lite.zip index dbd1848..40f2c83 100644 Binary files a/artifact/hyve-lite.zip and b/artifact/hyve-lite.zip differ diff --git a/inc/API.php b/inc/API.php index 048ca3f..33c0fa3 100644 --- a/inc/API.php +++ b/inc/API.php @@ -226,7 +226,7 @@ public function update_settings( $request ) { } if ( empty( $updated ) ) { - return rest_ensure_response( array( 'error' => __( 'No settings to update.', 'hyve' ) ) ); + return rest_ensure_response( array( 'error' => __( 'No settings to update.', 'hyve-lite' ) ) ); } $validation = apply_filters( @@ -267,7 +267,7 @@ function ( $carry, $item ) { return rest_ensure_response( array( // translators: %s: option key. - 'error' => sprintf( __( 'Invalid value: %s', 'hyve' ), $key ), + 'error' => sprintf( __( 'Invalid value: %s', 'hyve-lite' ), $key ), ) ); } @@ -290,7 +290,7 @@ function ( $carry, $item ) { update_option( 'hyve_settings', $settings ); - return rest_ensure_response( __( 'Settings updated.', 'hyve' ) ); + return rest_ensure_response( __( 'Settings updated.', 'hyve-lite' ) ); } /** @@ -426,7 +426,7 @@ public function add_data( $request ) { return rest_ensure_response( array( - 'error' => __( 'The content failed moderation policies.', 'hyve' ), + 'error' => __( 'The content failed moderation policies.', 'hyve-lite' ), 'code' => 'content_failed_moderation', 'review' => $moderation, ) @@ -555,7 +555,7 @@ function ( $message ) use ( $run_id ) { $message = json_decode( $message, true ); if ( json_last_error() !== JSON_ERROR_NONE ) { - return rest_ensure_response( array( 'error' => __( 'No messages found.', 'hyve' ) ) ); + return rest_ensure_response( array( 'error' => __( 'No messages found.', 'hyve-lite' ) ) ); } $settings = Main::get_settings(); @@ -586,7 +586,7 @@ public function send_chat( $request ) { $moderation = $this->moderate( $message ); if ( true !== $moderation ) { - return rest_ensure_response( array( 'error' => __( 'Message was flagged.', 'hyve' ) ) ); + return rest_ensure_response( array( 'error' => __( 'Message was flagged.', 'hyve-lite' ) ) ); } $openai = new OpenAI(); @@ -595,7 +595,7 @@ public function send_chat( $request ) { $message_vector = $message_vector->embedding; if ( is_wp_error( $message_vector ) ) { - return rest_ensure_response( array( 'error' => __( 'No embeddings found.', 'hyve' ) ) ); + return rest_ensure_response( array( 'error' => __( 'No embeddings found.', 'hyve-lite' ) ) ); } $hash = md5( strtolower( $message ) ); diff --git a/inc/BaseAPI.php b/inc/BaseAPI.php index 15625b0..32b1c64 100644 --- a/inc/BaseAPI.php +++ b/inc/BaseAPI.php @@ -50,8 +50,8 @@ public function __construct() { $this->table = new DB_Table(); $this->errors = array( - 'invalid_api_key' => __( 'Incorrect API key provided.', 'hyve' ), - 'missing_scope' => __( ' You have insufficient permissions for this operation.', 'hyve' ), + 'invalid_api_key' => __( 'Incorrect API key provided.', 'hyve-lite' ), + 'missing_scope' => __( ' You have insufficient permissions for this operation.', 'hyve-lite' ), ); } diff --git a/inc/DB_Table.php b/inc/DB_Table.php index 89e49a7..c79e9b9 100644 --- a/inc/DB_Table.php +++ b/inc/DB_Table.php @@ -95,7 +95,7 @@ public function create_table() { public function table_exists() { global $wpdb; $table = sanitize_text_field( $this->table_name ); - return $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + return $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table; } /** @@ -231,9 +231,7 @@ public function get_by_status( $status, $limit = 500 ) { return $cache; } - $query = $wpdb->prepare( "SELECT * FROM {$this->table_name} WHERE post_status = %s LIMIT %d", $status, $limit ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - $results = $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared + $results = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i WHERE post_status = %s LIMIT %d', $this->table_name, $status, $limit ) ); if ( 'scheduled' !== $status ) { $this->set_cache( 'entries_' . $status, $results ); @@ -292,9 +290,7 @@ public function get_count() { global $wpdb; - $query = "SELECT COUNT(*) FROM {$this->table_name}"; - - $count = $wpdb->get_var( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared + $count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM %i', $this->table_name ) ); $this->set_cache( 'entries_count', $count ); diff --git a/inc/Main.php b/inc/Main.php index d6319cc..7507795 100644 --- a/inc/Main.php +++ b/inc/Main.php @@ -68,8 +68,8 @@ public function __construct() { */ public function register_menu_page() { $page_hook_suffix = add_menu_page( - __( 'Hyve', 'hyve' ), - __( 'Hyve', 'hyve' ), + __( 'Hyve', 'hyve-lite' ), + __( 'Hyve', 'hyve-lite' ), 'manage_options', 'hyve', array( $this, 'menu_page' ), @@ -118,7 +118,7 @@ public function enqueue_options_assets() { true ); - wp_set_script_translations( 'hyve-lite-scripts', 'hyve' ); + wp_set_script_translations( 'hyve-lite-scripts', 'hyve-lite' ); $post_types = get_post_types( array( 'public' => true ), 'objects' ); $post_types_for_js = array(); @@ -170,8 +170,8 @@ public static function get_default_settings() { array( 'api_key' => '', 'chat_enabled' => true, - 'welcome_message' => __( 'Hello! How can I help you today?', 'hyve' ), - 'default_message' => __( 'Sorry, I\'m not able to help with that.', 'hyve' ), + 'welcome_message' => __( 'Hello! How can I help you today?', 'hyve-lite' ), + 'default_message' => __( 'Sorry, I\'m not able to help with that.', 'hyve-lite' ), 'temperature' => 1, 'top_p' => 1, 'moderation_threshold' => array( @@ -187,7 +187,7 @@ public static function get_default_settings() { 'harassment/threatening' => 60, 'violence' => 70, ), - ), + ) ); } @@ -228,7 +228,7 @@ public function enqueue_assets() { true ); - wp_set_script_translations( 'hyve-lite-scripts', 'hyve' ); + wp_set_script_translations( 'hyve-lite-scripts', 'hyve-lite' ); $settings = self::get_settings(); @@ -245,7 +245,7 @@ public function enqueue_assets() { ), 'welcome' => $settings['welcome_message'] ?? '', 'isEnabled' => $settings['chat_enabled'], - ), + ) ) ); @@ -262,21 +262,9 @@ public function enqueue_assets() { return; } - add_action( - 'wp_footer', - function () { - ?> - - Powered by Hyve"; document.querySelector( ".hyve-input-box" ).before( c ); });' ); } diff --git a/inc/OpenAI.php b/inc/OpenAI.php index b289102..8c03e19 100644 --- a/inc/OpenAI.php +++ b/inc/OpenAI.php @@ -99,7 +99,7 @@ public function create_assistant() { return $response->id; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the assistant.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the assistant.', 'hyve-lite' ) ); } /** @@ -201,7 +201,7 @@ public function create_embeddings( $content, $model = 'text-embedding-3-small' ) return $response->data; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the embeddings.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the embeddings.', 'hyve-lite' ) ); } /** @@ -225,7 +225,7 @@ public function create_thread( $params = array() ) { return $response->id; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the thread.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the thread.', 'hyve-lite' ) ); } /** @@ -254,7 +254,7 @@ public function send_message( $message, $thread, $role = 'assistant' ) { return true; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while sending the message.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while sending the message.', 'hyve-lite' ) ); } /** @@ -286,7 +286,7 @@ public function create_run( $messages, $thread ) { } if ( ! isset( $response->id ) || ( isset( $response->status ) && 'queued' !== $response->status ) ) { - return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the run.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while creating the run.', 'hyve-lite' ) ); } return $response->id; @@ -311,7 +311,7 @@ public function get_status( $run_id, $thread ) { return $response->status; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while getting the run status.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while getting the run status.', 'hyve-lite' ) ); } /** @@ -332,7 +332,7 @@ public function get_messages( $thread ) { return $response->data; } - return new \WP_Error( 'unknown_error', __( 'An error occurred while getting the messages.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while getting the messages.', 'hyve-lite' ) ); } /** @@ -430,7 +430,7 @@ private function request( $endpoint, $params = array(), $method = 'POST' ) { return new \WP_Error( isset( $body->error->code ) ? $body->error->code : 'unknown_error', $body->error->message ); } - return new \WP_Error( 'unknown_error', __( 'An error occurred while processing the request.', 'hyve' ) ); + return new \WP_Error( 'unknown_error', __( 'An error occurred while processing the request.', 'hyve-lite' ) ); } return $body; diff --git a/inc/Threads.php b/inc/Threads.php index e647d8f..9778dbe 100644 --- a/inc/Threads.php +++ b/inc/Threads.php @@ -27,25 +27,25 @@ public function __construct() { */ public function register() { $labels = array( - 'name' => _x( 'Threads', 'post type general name', 'hyve' ), - 'singular_name' => _x( 'Thread', 'post type singular name', 'hyve' ), - 'menu_name' => _x( 'Threads', 'admin menu', 'hyve' ), - 'name_admin_bar' => _x( 'Thread', 'add new on admin bar', 'hyve' ), - 'add_new' => _x( 'Add New', 'Thread', 'hyve' ), - 'add_new_item' => __( 'Add New Thread', 'hyve' ), - 'new_item' => __( 'New Thread', 'hyve' ), - 'edit_item' => __( 'Edit Thread', 'hyve' ), - 'view_item' => __( 'View Thread', 'hyve' ), - 'all_items' => __( 'All Threads', 'hyve' ), - 'search_items' => __( 'Search Threads', 'hyve' ), - 'parent_item_colon' => __( 'Parent Thread:', 'hyve' ), - 'not_found' => __( 'No Threads found.', 'hyve' ), - 'not_found_in_trash' => __( 'No Threads found in Trash.', 'hyve' ), + 'name' => _x( 'Threads', 'post type general name', 'hyve-lite' ), + 'singular_name' => _x( 'Thread', 'post type singular name', 'hyve-lite' ), + 'menu_name' => _x( 'Threads', 'admin menu', 'hyve-lite' ), + 'name_admin_bar' => _x( 'Thread', 'add new on admin bar', 'hyve-lite' ), + 'add_new' => _x( 'Add New', 'Thread', 'hyve-lite' ), + 'add_new_item' => __( 'Add New Thread', 'hyve-lite' ), + 'new_item' => __( 'New Thread', 'hyve-lite' ), + 'edit_item' => __( 'Edit Thread', 'hyve-lite' ), + 'view_item' => __( 'View Thread', 'hyve-lite' ), + 'all_items' => __( 'All Threads', 'hyve-lite' ), + 'search_items' => __( 'Search Threads', 'hyve-lite' ), + 'parent_item_colon' => __( 'Parent Thread:', 'hyve-lite' ), + 'not_found' => __( 'No Threads found.', 'hyve-lite' ), + 'not_found_in_trash' => __( 'No Threads found in Trash.', 'hyve-lite' ), ); $args = array( 'labels' => $labels, - 'description' => __( 'Threads.', 'hyve' ), + 'description' => __( 'Threads.', 'hyve-lite' ), 'public' => false, 'publicly_queryable' => false, 'show_ui' => false, @@ -206,8 +206,7 @@ public static function get_messages_count() { if ( ! $messages ) { global $wpdb; - $query = "SELECT SUM( CAST( meta_value AS UNSIGNED ) ) FROM {$wpdb->postmeta} WHERE meta_key = '_hyve_thread_count'"; - $messages = $wpdb->get_var( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared + $messages = $wpdb->get_var( $wpdb->prepare( "SELECT SUM( CAST( meta_value AS UNSIGNED ) ) FROM {$wpdb->postmeta} WHERE meta_key = %s", '_hyve_thread_count' ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared if ( ! $messages ) { $messages = 0; diff --git a/readme.txt b/readme.txt index 32f6436..90cc3c3 100644 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ -=== Hyve Lite === +=== Hyve Lite - AI Chatbot === Contributors: themeisle, hardeepasrani Tags: automation, support, chat, ai, openai Requires at least: 6.2 -Tested up to: 6.5 -Requires PHP: 5.6 -Stable tag: trunk +Tested up to: 6.6 +Requires PHP: 7.4 +Stable tag: 1.0.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html @@ -12,7 +12,29 @@ Hyve is an AI-powered chatbot that transforms your WordPress content into engagi == Description == -Hyve is an AI-powered chatbot that transforms your WordPress content into engaging conversations. It uses the content from your WordPress site as a knowledge base to intelligently respond to user inquiries, providing accurate and context-aware answers directly from your existing materials. +Hyve Lite is an AI-powered chatbot plugin for WordPress that transforms your website content into interactive conversations. It uses your posts and pages as a knowledge base, enabling dynamic user engagement. Easily manage the chatbot from your WordPress dashboard, control data via your OpenAI API key, and integrate custom data—no coding required. + +Hyve Lite offers customizable features such as welcome messages, moderation tools, and FAQ tracking for improved responses. It also allows fine-tuning of AI behavior with settings like temperature and predefined starter questions. + +For AI processing, Hyve relies on the OpenAI API to provide certain features, such as text generation and language processing. You can learn more about their Terms of use here: [OpenAI Terms of Use](https://openai.com/policies/terms-of-use/). + +### More with Hyve Pro + +By upgrading to [Hyve Pro](https://themeisle.com/plugins/hyve/?utm_source=plugin-readme&utm_medium=hyvelite&utm_campaign=profeatures), you unlock enhanced capabilities that enrich your chatbot's performance: + +- **Custom Data**: Add custom information to your chatbot’s knowledge base for data that may not be suitable for public display on your website. +- **FAQ Insights**: Review frequently asked but unanswered questions to improve your bot's knowledge base. +- **Chat History**: Access full chat history to analyze and enhance user interactions. +- **Suggested Questions**: Encourage engagement with predefined starter questions. +- **Appearance Customization**: Customize your chatbot's design to match your site’s branding. +- **Priority Support**: Enjoy peace of mind with premium customer support, helping you resolve issues quickly. + +== Screenshots == + +1. Your users will receive fast replies to the most common questions. +2. Hyve allows you to build a chatbot knowledge base by pulling information directly from your site's content. You can also manually add custom data to address specific user queries. +3. Hyve enables you to track all conversations between users and the chatbot through a clear chat history. +4. Hyve captures missed questions that users asked but were not answered by the bot. You can review these and easily add relevant answers to enhance future interactions. == Installation == @@ -33,3 +55,17 @@ To download and install the Hyve plugin, make sure you follow the steps below: - Click on the Activate button under the "Plugin installed successfully" message. If you want to upload the plugin using FTP, [click here](https://themeisle.com/blog/what-is-ftp-wordpress/) to see a detailed explanation about it. + +== Frequently Asked Questions == + += Is Hyve Lite free? = + +Yes, Hyve Lite is available for free with essential features. For additional functionality, you can [upgrade to the premium version](https://themeisle.com/plugins/hyve/?utm_source=plugin-readme&utm_medium=hyvelite&utm_campaign=faq). + += Do I need coding skills to use Hyve Lite? = + +No, Hyve Lite is designed for users without coding skills. You can manage everything directly from the WordPress dashboard. + += How does Hyve Lite use the OpenAI API? = + +Hyve Lite uses the OpenAI API for language processing tasks like text generation. Data is sent to OpenAI’s servers for processing during these tasks. \ No newline at end of file diff --git a/src/backend/parts/Home.js b/src/backend/parts/Home.js index 38c9037..be8d2ea 100644 --- a/src/backend/parts/Home.js +++ b/src/backend/parts/Home.js @@ -22,19 +22,19 @@ import { const STATUS = [ { - label: __( 'Sessions', 'hyve' ), + label: __( 'Sessions', 'hyve-lite' ), value: hyve?.stats?.threads, - description: __( 'Unique chat sessions created by your users.', 'hyve' ) + description: __( 'Unique chat sessions created by your users.', 'hyve-lite' ) }, { - label: __( 'Messages', 'hyve' ), + label: __( 'Messages', 'hyve-lite' ), value: hyve?.stats?.messages, - description: __( 'Total messages exchanged between users and Hyve.', 'hyve' ) + description: __( 'Total messages exchanged between users and Hyve.', 'hyve-lite' ) }, { - label: __( 'Knowledge Base', 'hyve' ), + label: __( 'Knowledge Base', 'hyve-lite' ), value: `${ hyve?.stats?.totalChunks } / ${ hyve?.chunksLimit }`, - description: __( 'Current knowledge base chunks used.', 'hyve' ) + description: __( 'Current knowledge base chunks used.', 'hyve-lite' ) } ]; @@ -47,16 +47,16 @@ const Home = () => { return (
-

{ __( 'Welcome to Hyve! Designed to seamlessly integrate AI chat into your WordPress site, this plugin allows you to craft a personalized chat experience using your own posts and pages. Enjoy engaging with your website visitors through Hyve!', 'hyve' ) }

+

{ __( 'Welcome to Hyve! Designed to seamlessly integrate AI chat into your WordPress site, this plugin allows you to craft a personalized chat experience using your own posts and pages. Enjoy engaging with your website visitors through Hyve!', 'hyve-lite' ) }

-

{ __( 'To begin using the Hyve plugin, you\'ll need an OpenAI API key. This key enables Hyve to communicate with OpenAI\'s powerful language models, ensuring you get the best possible responses.', 'hyve' ) }

+

{ __( 'To begin using the Hyve plugin, you\'ll need an OpenAI API key. This key enables Hyve to communicate with OpenAI\'s powerful language models, ensuring you get the best possible responses.', 'hyve-lite' ) }

@@ -84,20 +84,20 @@ const Home = () => { const ACTIONS = [ { - label: __( 'Knowledge Base', 'hyve' ), - description: __( 'In Knowledge Base, view and remove any Posts/Pages added to Hyve from the chat\'s data source.', 'hyve' ), + label: __( 'Knowledge Base', 'hyve-lite' ), + description: __( 'In Knowledge Base, view and remove any Posts/Pages added to Hyve from the chat\'s data source.', 'hyve-lite' ), icon: archive, action: () => setRoute( 'data' ) }, { - label: __( 'Personalize', 'hyve' ), - description: __( 'Customize Hyve\'s behavior and appearance to better suit your website and brand.', 'hyve' ), + label: __( 'Personalize', 'hyve-lite' ), + description: __( 'Customize Hyve\'s behavior and appearance to better suit your website and brand.', 'hyve-lite' ), icon: brush, action: () => setRoute( 'settings' ) }, { - label: __( 'Need help?', 'hyve' ), - description: __( 'Check out our documentation or contact support for assistance.', 'hyve' ), + label: __( 'Need help?', 'hyve-lite' ), + description: __( 'Check out our documentation or contact support for assistance.', 'hyve-lite' ), icon: help, action: () => window?.open( window?.hyve?.docs, '_blank' ) } @@ -106,11 +106,11 @@ const Home = () => { return (

- { __( 'Overview', 'hyve' ) } + { __( 'Overview', 'hyve-lite' ) }

@@ -136,7 +136,7 @@ const Home = () => {

- { __( 'Get Started', 'hyve' ) } + { __( 'Get Started', 'hyve-lite' ) }

diff --git a/src/backend/parts/Messages.js b/src/backend/parts/Messages.js index 09789a8..f8a6fa3 100644 --- a/src/backend/parts/Messages.js +++ b/src/backend/parts/Messages.js @@ -38,7 +38,7 @@ const LoadMore = ({ onClick }) => ( className="flex items-center justify-center p-4 h-auto w-full text-base font-normal text-gray-900 hover:text-gray-900 hover:bg-gray-100 border-t-gray-300 border-t-[0.5px] border-solid" >
- { __( 'Load more', 'hyve' ) } + { __( 'Load more', 'hyve-lite' ) }
); @@ -76,8 +76,8 @@ const Messages = () => { className="md:max-w-3xl md:w-full overflow-hidden" > { ) } -

{ __( 'Here you can see an history of all the messages between Hyve and your users.', 'hyve' ) }

+

{ __( 'Here you can see an history of all the messages between Hyve and your users.', 'hyve-lite' ) }

{ ( isLoading && ! posts?.length ) && (
@@ -102,7 +102,7 @@ const Messages = () => { { ( ! isLoading && ! posts?.length ) && (
-

{ __( 'Messsages between Hyve and your users will appear here', 'hyve' ) }

+

{ __( 'Messsages between Hyve and your users will appear here', 'hyve-lite' ) }

)} @@ -143,14 +143,14 @@ const Messages = () => {
{ ! selectedPost && (
-

{ __( 'Select a message to view the conversation', 'hyve' ) }

+

{ __( 'Select a message to view the conversation', 'hyve-lite' ) }

) } { selectedPost && ( <>
-

{ __( 'Thread ID', 'hyve' ) }

+

{ __( 'Thread ID', 'hyve-lite' ) }

{ selectedPost?.thread_id?.replace( 'thread_', '' ) }

diff --git a/src/backend/parts/ModerationReview.js b/src/backend/parts/ModerationReview.js index dcc7cec..de29c51 100644 --- a/src/backend/parts/ModerationReview.js +++ b/src/backend/parts/ModerationReview.js @@ -56,14 +56,14 @@ const ModerationReview = ({ return ( -

{ __( 'The content of the post listed here could not be added or updated due to non-compliance with content policies. Review these to understand the limitations and possibly modify content to align with required standards.', 'hyve' ) }

+

{ __( 'The content of the post listed here could not be added or updated due to non-compliance with content policies. Review these to understand the limitations and possibly modify content to align with required standards.', 'hyve-lite' ) }

-

{ __( 'The following content was flagged for:', 'hyve' ) }

+

{ __( 'The following content was flagged for:', 'hyve-lite' ) }

{ post && Object.keys( post.review ).map( review => (
) ) } -

{ __( 'Occasionally, OpenAI\'s Moderation system may incorrectly flag content as a violation—these are false positives. Such errors can occur because automated systems sometimes lack the necessary context to interpret nuances accurately. If your content is flagged but you believe it adheres to the guidelines, please manually review it. Should you determine it does not violate the content policies, you can click the button below to override the moderation decision.', 'hyve' ) }

+

{ __( 'Occasionally, OpenAI\'s Moderation system may incorrectly flag content as a violation—these are false positives. Such errors can occur because automated systems sometimes lack the necessary context to interpret nuances accurately. If your content is flagged but you believe it adheres to the guidelines, please manually review it. Should you determine it does not violate the content policies, you can click the button below to override the moderation decision.', 'hyve-lite' ) }

diff --git a/src/backend/parts/PostModal.js b/src/backend/parts/PostModal.js index 0101b92..89a7d1f 100644 --- a/src/backend/parts/PostModal.js +++ b/src/backend/parts/PostModal.js @@ -62,7 +62,7 @@ const PostModal = ({ createNotice( 'success', - __( 'Post has been deleted.', 'hyve' ), + __( 'Post has been deleted.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -117,7 +117,7 @@ const PostModal = ({ return ( onClose( false ) } shouldCloseOnOverlayClick={ true } isOpen={ true } @@ -125,7 +125,7 @@ const PostModal = ({ >
{ @@ -137,7 +137,7 @@ const PostModal = ({ /> - { __( 'Delete', 'hyve' ) } + { __( 'Delete', 'hyve-lite' ) } ) } @@ -170,7 +170,7 @@ const PostModal = ({ isBusy={ isLoading } onClick={ onProcess } > - { isEdit ? __( 'Save', 'hyve' ) : __( 'Add', 'hyve' )} + { isEdit ? __( 'Save', 'hyve-lite' ) : __( 'Add', 'hyve-lite' )}
diff --git a/src/backend/parts/PostsTable.js b/src/backend/parts/PostsTable.js index 3fe9bca..639c468 100644 --- a/src/backend/parts/PostsTable.js +++ b/src/backend/parts/PostsTable.js @@ -24,9 +24,9 @@ const PostsTable = ({
-
{ __( 'ID', 'hyve' ) }
-
{ __( 'Title', 'hyve' ) }
-
{ __( 'Action', 'hyve' ) }
+
{ __( 'ID', 'hyve-lite' ) }
+
{ __( 'Title', 'hyve-lite' ) }
+
{ __( 'Action', 'hyve-lite' ) }
@@ -69,7 +69,7 @@ const PostsTable = ({ { ( ! posts.length && ! isLoading ) && (
- {__( 'No data found.', 'hyve' )} + {__( 'No data found.', 'hyve-lite' )}
)}
@@ -87,7 +87,7 @@ const PostsTable = ({ variant="secondary" onClick={ onFetch } > - { __( 'Load More', 'hyve' ) } + { __( 'Load More', 'hyve-lite' ) }
)} diff --git a/src/backend/parts/Sidebar.js b/src/backend/parts/Sidebar.js index 0b2c49e..e456283 100644 --- a/src/backend/parts/Sidebar.js +++ b/src/backend/parts/Sidebar.js @@ -40,7 +40,7 @@ const Sidebar = () => { return (
diff --git a/src/backend/parts/data/AddData.js b/src/backend/parts/data/AddData.js index 1010934..4944b18 100644 --- a/src/backend/parts/data/AddData.js +++ b/src/backend/parts/data/AddData.js @@ -44,7 +44,7 @@ const excludeTypes = [ 'attachment' ]; let postTypes = window.hyve.postTypes.filter( ( postType ) => ! excludeTypes.includes( postType.value ) ); postTypes.unshift({ - label: __( 'All', 'hyve' ), + label: __( 'All', 'hyve-lite' ), value: 'any' }); @@ -130,7 +130,7 @@ const AddData = () => { <>
{ hasReachedLimit && ( @@ -138,17 +138,17 @@ const AddData = () => { status="warning" isDismissible={ false } > - { __( 'You have reached the limit of posts that can be added to the knowledge base. Please delete existing posts if you wish to add more.', 'hyve' ) } + { __( 'You have reached the limit of posts that can be added to the knowledge base. Please delete existing posts if you wish to add more.', 'hyve-lite' ) } ) } -

{ __( 'Select posts that are informative, engaging, and relevant. These will be the building blocks that empower your chat assistant to deliver precise and helpful responses. Whether it is answering FAQs or diving into detailed explanations, the content you choose here will shape how effectively your assistant interacts with users.', 'hyve' ) }

+

{ __( 'Select posts that are informative, engaging, and relevant. These will be the building blocks that empower your chat assistant to deliver precise and helpful responses. Whether it is answering FAQs or diving into detailed explanations, the content you choose here will shape how effectively your assistant interacts with users.', 'hyve-lite' ) }

{
onChangeQuery( 'search', e )} /> @@ -171,7 +171,7 @@ const AddData = () => { hasMore={ hasMore } onFetch={ fetchData } onAction={ onProcess } - actionLabel={ __( 'Add', 'hyve' ) } + actionLabel={ __( 'Add', 'hyve-lite' ) } isBusy={ isUpdating } isDisabled={ hasReachedLimit } /> diff --git a/src/backend/parts/data/Custom.js b/src/backend/parts/data/Custom.js index c0cd6fd..de84308 100644 --- a/src/backend/parts/data/Custom.js +++ b/src/backend/parts/data/Custom.js @@ -24,27 +24,27 @@ import UpsellContainer from '../UpsellContainer'; const posts = [ { ID: 1, - title: __( 'Halloween Limited Time Deal Information', 'hyve' ) + title: __( 'Halloween Limited Time Deal Information', 'hyve-lite' ) }, { ID: 2, - title: __( 'What to do if my order is missing an item?', 'hyve' ) + title: __( 'What to do if my order is missing an item?', 'hyve-lite' ) }, { ID: 3, - title: __( 'How do I return an item?', 'hyve' ) + title: __( 'How do I return an item?', 'hyve-lite' ) }, { ID: 4, - title: __( 'How do I track my order?', 'hyve' ) + title: __( 'How do I track my order?', 'hyve-lite' ) }, { ID: 5, - title: __( 'How do I change my delivery address?', 'hyve' ) + title: __( 'How do I change my delivery address?', 'hyve-lite' ) }, { ID: 6, - title: __( 'How do I cancel my order?', 'hyve' ) + title: __( 'How do I cancel my order?', 'hyve-lite' ) } ]; @@ -52,21 +52,21 @@ const Custom = () => { return (
-

{ __( 'Custom Data allows you to privately feed specific data directly into your chat bot without displaying this information on your public website. With this, you can equip your bot with unique, specialized knowledge that aligns with your business needs and customer queries.', 'hyve' ) }

+

{ __( 'Custom Data allows you to privately feed specific data directly into your chat bot without displaying this information on your public website. With this, you can equip your bot with unique, specialized knowledge that aligns with your business needs and customer queries.', 'hyve-lite' ) }

{} } /> @@ -77,7 +77,7 @@ const Custom = () => { variant="secondary" onClick={ () => {} } > - { __( 'Add New', 'hyve' ) } + { __( 'Add New', 'hyve-lite' ) }
@@ -88,7 +88,7 @@ const Custom = () => { hasMore={ false } onFetch={ () => {} } onAction={ () => {} } - actionLabel={ __( 'Edit', 'hyve' ) } + actionLabel={ __( 'Edit', 'hyve-lite' ) } isBusy={ [] } />
diff --git a/src/backend/parts/data/FAQ.js b/src/backend/parts/data/FAQ.js index 678d453..910fb21 100644 --- a/src/backend/parts/data/FAQ.js +++ b/src/backend/parts/data/FAQ.js @@ -16,27 +16,27 @@ import UpsellContainer from '../UpsellContainer'; const posts = [ { - question: __( 'How do I reset my password?', 'hyve' ), + question: __( 'How do I reset my password?', 'hyve-lite' ), count: 5 }, { - question: __( 'How do I change my email address?', 'hyve' ), + question: __( 'How do I change my email address?', 'hyve-lite' ), count: 3 }, { - question: __( 'How do I update my payment method?', 'hyve' ), + question: __( 'How do I update my payment method?', 'hyve-lite' ), count: 2 }, { - question: __( 'How do I cancel my subscription?', 'hyve' ), + question: __( 'How do I cancel my subscription?', 'hyve-lite' ), count: 1 }, { - question: __( 'How do I change my plan?', 'hyve' ), + question: __( 'How do I change my plan?', 'hyve-lite' ), count: 1 }, { - question: __( 'How do I update my billing information?', 'hyve' ), + question: __( 'How do I update my billing information?', 'hyve-lite' ), count: 1 } ]; @@ -45,24 +45,24 @@ const Custom = () => { return (
-

{ __( 'The FAQ captures frequently asked questions that went unanswered by our chatbot, providing you with a valuable insight into what your users are seeking. This feature allows you to review these queries and decide whether to incorporate them into your bot\'s knowledge base. By actively updating your FAQ, you can continuously refine your chatbot\'s ability to address user needs effectively and enhance their interactive experience. These aren\'t updated instantly.', 'hyve' ) }

+

{ __( 'The FAQ captures frequently asked questions that went unanswered by our chatbot, providing you with a valuable insight into what your users are seeking. This feature allows you to review these queries and decide whether to incorporate them into your bot\'s knowledge base. By actively updating your FAQ, you can continuously refine your chatbot\'s ability to address user needs effectively and enhance their interactive experience. These aren\'t updated instantly.', 'hyve-lite' ) }

-
{ __( 'Title', 'hyve' ) }
-
{ __( 'Count', 'hyve' ) }
-
{ __( 'Action', 'hyve' ) }
+
{ __( 'Title', 'hyve-lite' ) }
+
{ __( 'Count', 'hyve-lite' ) }
+
{ __( 'Action', 'hyve-lite' ) }
@@ -83,7 +83,7 @@ const Custom = () => { onClick={ () => {} } className="w-20 justify-center" > - { __( 'Delete', 'hyve' ) } + { __( 'Delete', 'hyve-lite' ) }
diff --git a/src/backend/parts/data/FailedModeration.js b/src/backend/parts/data/FailedModeration.js index 1ece68e..72e2983 100644 --- a/src/backend/parts/data/FailedModeration.js +++ b/src/backend/parts/data/FailedModeration.js @@ -92,10 +92,10 @@ const FailedModeration = () => { <>
-

{ __( 'On this page, you\'ll find posts and pages that could not be added or updated due to non-compliance with content policies. Review these to understand the limitations and possibly modify content to align with required standards. You can also adjust the moderation threshold in the Settings.', 'hyve' ) }

+

{ __( 'On this page, you\'ll find posts and pages that could not be added or updated due to non-compliance with content policies. Review these to understand the limitations and possibly modify content to align with required standards. You can also adjust the moderation threshold in the Settings.', 'hyve-lite' ) }

{ hasMore={ hasMoreUpdate } onFetch={ fetchUpdate } onAction={ onUpdate } - actionLabel={ __( 'Update', 'hyve' ) } + actionLabel={ __( 'Update', 'hyve-lite' ) } isBusy={ isUpdating } secondaryAction={ { - label: __( 'More Info', 'hyve' ), + label: __( 'More Info', 'hyve-lite' ), action: post => { setOpen( true ); setPost( post ); diff --git a/src/backend/parts/data/KnowledgeBase.js b/src/backend/parts/data/KnowledgeBase.js index ddff021..194fcf9 100644 --- a/src/backend/parts/data/KnowledgeBase.js +++ b/src/backend/parts/data/KnowledgeBase.js @@ -63,7 +63,7 @@ const KnowledgeBase = () => { createNotice( 'success', - __( 'Post has been removed.', 'hyve' ), + __( 'Post has been removed.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -78,10 +78,10 @@ const KnowledgeBase = () => { return (
-

{ __( 'A list of all the content that has been added to the knowledge base. It\'s the foundation that supports your chat assistant, enabling it to provide accurate and insightful responses.', 'hyve' ) }

+

{ __( 'A list of all the content that has been added to the knowledge base. It\'s the foundation that supports your chat assistant, enabling it to provide accurate and insightful responses.', 'hyve-lite' ) }

{ hasMore={ hasMore } onFetch={ fetchPosts } onAction={ onDelete } - actionLabel={ __( 'Remove', 'hyve' ) } + actionLabel={ __( 'Remove', 'hyve-lite' ) } isBusy={ isDeleting } />
diff --git a/src/backend/parts/data/Updated.js b/src/backend/parts/data/Updated.js index a4e1f8f..5bfc4b5 100644 --- a/src/backend/parts/data/Updated.js +++ b/src/backend/parts/data/Updated.js @@ -92,10 +92,10 @@ const Updated = () => { <>
-

{ __( 'Here, you\'ll see posts that have been updated since their addition to the knowledge base. This page allows you to review these updates and decide if you want to refresh the knowledge your assistant relies on.', 'hyve' ) }

+

{ __( 'Here, you\'ll see posts that have been updated since their addition to the knowledge base. This page allows you to review these updates and decide if you want to refresh the knowledge your assistant relies on.', 'hyve-lite' ) }

{ hasMore={ hasMoreUpdate } onFetch={ fetchUpdate } onAction={ onUpdate } - actionLabel={ __( 'Update', 'hyve' ) } + actionLabel={ __( 'Update', 'hyve-lite' ) } isBusy={ isUpdating } />
diff --git a/src/backend/parts/settings/Advanced.js b/src/backend/parts/settings/Advanced.js index 5c477cf..5abb366 100644 --- a/src/backend/parts/settings/Advanced.js +++ b/src/backend/parts/settings/Advanced.js @@ -56,7 +56,7 @@ const Advanced = () => { createNotice( 'success', - __( 'Settings saved.', 'hyve' ), + __( 'Settings saved.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -77,14 +77,14 @@ const Advanced = () => { return (
{ - { __( 'Get an API key', 'hyve' ) } + { __( 'Get an API key', 'hyve-lite' ) } diff --git a/src/backend/parts/settings/Appearance.js b/src/backend/parts/settings/Appearance.js index cc68bbb..fc0ebbe 100644 --- a/src/backend/parts/settings/Appearance.js +++ b/src/backend/parts/settings/Appearance.js @@ -19,22 +19,22 @@ import UpsellContainer from '../UpsellContainer'; const colorOptions = [ { - label: __( 'Chat Background', 'hyve' ), + label: __( 'Chat Background', 'hyve-lite' ), value: 'chat_background', default: '#ffffff' }, { - label: __( 'Assistant Background', 'hyve' ), + label: __( 'Assistant Background', 'hyve-lite' ), value: 'assistant_background', default: '#ecf1fb' }, { - label: __( 'User Background', 'hyve' ), + label: __( 'User Background', 'hyve-lite' ), value: 'user_background', default: '#1155cc' }, { - label: __( 'Icon Background', 'hyve' ), + label: __( 'Icon Background', 'hyve-lite' ), value: 'icon_background', default: '#1155cc' } @@ -44,11 +44,11 @@ const Appearance = () => { return (
@@ -72,7 +72,7 @@ const Appearance = () => { className="mt-2" onClick={ () => {} } > - { __( 'Save', 'hyve' ) } + { __( 'Save', 'hyve-lite' ) } diff --git a/src/backend/parts/settings/Assistant.js b/src/backend/parts/settings/Assistant.js index 8d39ec6..53954aa 100644 --- a/src/backend/parts/settings/Assistant.js +++ b/src/backend/parts/settings/Assistant.js @@ -47,7 +47,7 @@ const Assistant = () => { createNotice( 'success', - __( 'Settings saved.', 'hyve' ), + __( 'Settings saved.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -68,12 +68,12 @@ const Assistant = () => { return (
{ { className="mt-2" onClick={ onSave } > - { __( 'Save', 'hyve' ) } + { __( 'Save', 'hyve-lite' ) } diff --git a/src/backend/parts/settings/General.js b/src/backend/parts/settings/General.js index 151c6a4..433586a 100644 --- a/src/backend/parts/settings/General.js +++ b/src/backend/parts/settings/General.js @@ -27,22 +27,22 @@ import { applyFilters } from '@wordpress/hooks'; const SuggestedQuestions = () => { return ( -

{ __( 'These questions will be displayed in the chat to get the conversation started.', 'hyve' ) }

+

{ __( 'These questions will be displayed in the chat to get the conversation started.', 'hyve-lite' ) }

{ Array.from({ length: 3 }).map( ( _, index ) => ( {} } /> @@ -85,7 +85,7 @@ const General = () => { createNotice( 'success', - __( 'Settings saved.', 'hyve' ), + __( 'Settings saved.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -106,25 +106,25 @@ const General = () => { return (
setSetting( 'chat_enabled', Boolean( newValue ) ) } > @@ -133,8 +133,8 @@ const General = () => { setSetting( 'welcome_message', newValue ) } @@ -143,8 +143,8 @@ const General = () => { setSetting( 'default_message', newValue ) } @@ -161,7 +161,7 @@ const General = () => { className="mt-2" onClick={ onSave } > - { __( 'Save', 'hyve' ) } + { __( 'Save', 'hyve-lite' ) } diff --git a/src/backend/parts/settings/Moderation.js b/src/backend/parts/settings/Moderation.js index cd255c6..2a066bc 100644 --- a/src/backend/parts/settings/Moderation.js +++ b/src/backend/parts/settings/Moderation.js @@ -50,7 +50,7 @@ const Moderation = () => { createNotice( 'success', - __( 'Settings saved.', 'hyve' ), + __( 'Settings saved.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true @@ -78,12 +78,12 @@ const Moderation = () => { return (
-

{ __( 'With the moderation functionality, you can check whether your content is potentially harmful. Users can use it to identify content that might be harmful and take action.', 'hyve' ) }

+

{ __( 'With the moderation functionality, you can check whether your content is potentially harmful. Users can use it to identify content that might be harmful and take action.', 'hyve-lite' ) }

-

{ __( 'Occasionally, OpenAI\'s Moderation system may incorrectly flag content as a violation—these are false positives. Such errors can occur because automated systems sometimes lack the necessary context to interpret nuances accurately. If your content is flagged but you believe it adheres to the guidelines, please manually review it. Should you determine it does not violate the content policies, you can also override the moderation decisions.', 'hyve' ) }

+

{ __( 'Occasionally, OpenAI\'s Moderation system may incorrectly flag content as a violation—these are false positives. Such errors can occur because automated systems sometimes lack the necessary context to interpret nuances accurately. If your content is flagged but you believe it adheres to the guidelines, please manually review it. Should you determine it does not violate the content policies, you can also override the moderation decisions.', 'hyve-lite' ) }

{ Object.keys( moderationLabels ).map( moderation => ( { className="mt-2" onClick={ onSave } > - { __( 'Save', 'hyve' ) } + { __( 'Save', 'hyve-lite' ) }
diff --git a/src/backend/route.js b/src/backend/route.js index 2dc5819..132cbea 100644 --- a/src/backend/route.js +++ b/src/backend/route.js @@ -29,74 +29,74 @@ import Advanced from './parts/settings/Advanced'; export const ROUTE_TREE = { home: { - label: __( 'Dashboard', 'hyve' ), + label: __( 'Dashboard', 'hyve-lite' ), icon: home, component: Home, disabled: false }, data: { - label: __( 'Data', 'hyve' ), + label: __( 'Data', 'hyve-lite' ), icon: archive, children: { data: { - label: __( 'Knowledge Base', 'hyve' ), + label: __( 'Knowledge Base', 'hyve-lite' ), component: KnowledgeBase }, add: { - label: __( 'Add Data', 'hyve' ), + label: __( 'Add Data', 'hyve-lite' ), component: AddData }, update: { - label: __( 'Requires Update', 'hyve' ), + label: __( 'Requires Update', 'hyve-lite' ), component: Updated }, flagged: { - label: __( 'Failed Moderation', 'hyve' ), + label: __( 'Failed Moderation', 'hyve-lite' ), component: FailedModeration }, custom: { - label: __( 'Custom Data', 'hyve' ), + label: __( 'Custom Data', 'hyve-lite' ), component: Custom, isPro: true }, faq: { - label: __( 'FAQ', 'hyve' ), + label: __( 'FAQ', 'hyve-lite' ), component: FAQ, isPro: true } } }, messages: { - label: __( 'Messages', 'hyve' ), + label: __( 'Messages', 'hyve-lite' ), icon: comment, component: Messages }, settings: { - label: __( 'Settings', 'hyve' ), + label: __( 'Settings', 'hyve-lite' ), icon: settings, children: { settings: { - label: __( 'General', 'hyve' ), + label: __( 'General', 'hyve-lite' ), component: General }, appearance: { - label: __( 'Appearance', 'hyve' ), + label: __( 'Appearance', 'hyve-lite' ), component: Appearance, disabled: true, isPro: true }, assistant: { - label: __( 'Assistant', 'hyve' ), + label: __( 'Assistant', 'hyve-lite' ), component: Assistant, disabled: true }, moderation: { - label: __( 'Moderation', 'hyve' ), + label: __( 'Moderation', 'hyve-lite' ), component: Moderation, disabled: true }, advanced: { - label: __( 'Advanced', 'hyve' ), + label: __( 'Advanced', 'hyve-lite' ), component: Advanced, disabled: false } diff --git a/src/backend/utils.js b/src/backend/utils.js index 8dbe97b..22f222c 100644 --- a/src/backend/utils.js +++ b/src/backend/utils.js @@ -99,58 +99,58 @@ export const tokenize = ( post, chunk = true ) => { export const moderationLabels = { 'hate': { - label: __( 'Hate Speech', 'hyve' ), - description: __( 'Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.', 'hyve' ), + label: __( 'Hate Speech', 'hyve-lite' ), + description: __( 'Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.', 'hyve-lite' ), default: 0.7 }, 'hate/threatening': { - label: __( 'Hate Speech/Threatening', 'hyve' ), - description: __( 'Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.', 'hyve' ), + label: __( 'Hate Speech/Threatening', 'hyve-lite' ), + description: __( 'Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.', 'hyve-lite' ), default: 0.6 }, 'harassment': { - label: __( 'Harassment', 'hyve' ), - description: __( 'Content that expresses, incites, or promotes harassing language towards any target.', 'hyve' ), + label: __( 'Harassment', 'hyve-lite' ), + description: __( 'Content that expresses, incites, or promotes harassing language towards any target.', 'hyve-lite' ), default: 0.7 }, 'harassment/threatening': { - label: __( 'Harassment/Threatening', 'hyve' ), - description: __( 'Harassment content that also includes violence or serious harm towards any target.', 'hyve' ), + label: __( 'Harassment/Threatening', 'hyve-lite' ), + description: __( 'Harassment content that also includes violence or serious harm towards any target.', 'hyve-lite' ), default: 0.6 }, 'self-harm': { - label: __( 'Self-Harm', 'hyve' ), - description: __( 'Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.', 'hyve' ), + label: __( 'Self-Harm', 'hyve-lite' ), + description: __( 'Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.', 'hyve-lite' ), default: 0.5 }, 'self-harm/intent': { - label: __( 'Self-Harm with Intent', 'hyve' ), - description: __( 'Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.', 'hyve' ), + label: __( 'Self-Harm with Intent', 'hyve-lite' ), + description: __( 'Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.', 'hyve-lite' ), default: 0.5 }, 'self-harm/instructions': { - label: __( 'Self-Harm Instructions', 'hyve' ), - description: __( 'Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.', 'hyve' ), + label: __( 'Self-Harm Instructions', 'hyve-lite' ), + description: __( 'Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.', 'hyve-lite' ), default: 0.5 }, 'sexual': { - label: __( 'Sexual Content', 'hyve' ), - description: __( 'Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).', 'hyve' ), + label: __( 'Sexual Content', 'hyve-lite' ), + description: __( 'Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).', 'hyve-lite' ), default: 0.8 }, 'sexual/minors': { - label: __( 'Sexual Content Involving Minors', 'hyve' ), - description: __( 'Sexual content that includes an individual who is under 18 years old.', 'hyve' ), + label: __( 'Sexual Content Involving Minors', 'hyve-lite' ), + description: __( 'Sexual content that includes an individual who is under 18 years old.', 'hyve-lite' ), default: 0.5 }, 'violence': { - label: __( 'Violence', 'hyve' ), - description: __( 'Content that depicts death, violence, or physical injury.', 'hyve' ), + label: __( 'Violence', 'hyve-lite' ), + description: __( 'Content that depicts death, violence, or physical injury.', 'hyve-lite' ), default: 0.7 }, 'violence/graphic': { - label: __( 'Graphic Violence', 'hyve' ), - description: __( 'Content that depicts death, violence, or physical injury in graphic detail.', 'hyve' ), + label: __( 'Graphic Violence', 'hyve-lite' ), + description: __( 'Content that depicts death, violence, or physical injury in graphic detail.', 'hyve-lite' ), default: 0.8 } }; @@ -212,7 +212,7 @@ export const onProcessData = async({ createNotice( 'success', - __( 'Post has been updated.', 'hyve' ), + __( 'Post has been updated.', 'hyve-lite' ), { type: 'snackbar', isDismissible: true diff --git a/src/block/block.json b/src/block/block.json index f553db0..0267d71 100644 --- a/src/block/block.json +++ b/src/block/block.json @@ -28,7 +28,7 @@ } } ], - "textdomain": "hyve", + "textdomain": "hyve-lite", "editorScript": "file:./index.js", "render": "file:./render.php", "style": "hyve-styles", diff --git a/src/block/index.js b/src/block/index.js index e2d2372..480050f 100644 --- a/src/block/index.js +++ b/src/block/index.js @@ -21,7 +21,7 @@ registerBlockType( metadata.name, { return (
- { __( 'Hyve Chatbot will appear here. No further action needed.', 'hyve' ) } + { __( 'Hyve Chatbot will appear here. No further action needed.', 'hyve-lite' ) }
); diff --git a/src/block/render.php b/src/block/render.php index 9e42bda..339f67f 100644 --- a/src/block/render.php +++ b/src/block/render.php @@ -5,6 +5,11 @@ * @package Codeinwp/HyveLite */ +// If this file is called directly, abort. +if ( ! defined( 'WPINC' ) ) { + die; +} + $hyve_id = 'hyve-inline-chat'; if ( isset( $attributes['variant'] ) && 'floating' === $attributes['variant'] ) {