| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | echo (get_option( 'ai_enabled') == 1) ? esc_attr( 'checked','chatbot') :'';?> role="switch" value="" id="is_ai_enabled"> |
| 7 | 7 | <label class="form-check-label" for="is_ai_enabled"> |
| 8 | 8 | <?php esc_html_e( 'Enable OpenAI','chatbot'); ?> |
| 9 | 9 | </label> |
| 10 | - <span style="color:red"> <?php esc_html_e( '(if you want results from OpenAI only, disable Site Search from Settings->Start Menu)','chatbot'); ?></span> | |
| 10 | + <span style="color:red"> <?php esc_html_e( '(if you want results from OpenAI only, disable Site Search from Settings->Action Start Menu)','chatbot'); ?></span> | |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
| 13 | 13 | <div class="col-sm-6"> |
| 14 | 14 | <div class="mb-3"> |
| @@ -39,8 +39,9 @@ | ||
| 39 | 39 | </label> |
| 40 | 40 | <?php |
| 41 | 41 | $qcld_openai_current_system_content = get_option( 'qcld_openai_system_content' ); |
| 42 | 42 | $qcld_openai_current_site_url = esc_url( home_url() ); |
| 43 | + // phpcs:disable PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- Preset content is static multi-line text with one interpolated site URL. | |
| 43 | 44 | $qcld_openai_system_presets = array( |
| 44 | 45 | array( |
| 45 | 46 | 'label' => __( 'Default', 'chatbot' ), |
| 46 | 47 | 'content' => <<<QCLD_OPENAI_SYSTEM_PRESET |
| @@ -367,8 +368,9 @@ | ||
| 367 | 368 | Ask for clarification ONLY when a query is highly ambiguous and prevents you from pulling the proper program structure or sign-up flow from the documentation. |
| 368 | 369 | QCLD_OPENAI_SYSTEM_PRESET, |
| 369 | 370 | ), |
| 370 | 371 | ); |
| 372 | + // phpcs:enable PluginCheck.CodeAnalysis.Heredoc.NotAllowed | |
| 371 | 373 | if ( empty( $qcld_openai_current_system_content ) && ! empty( $qcld_openai_system_presets[0]['content'] ) ) { |
| 372 | 374 | $qcld_openai_current_system_content = $qcld_openai_system_presets[0]['content']; |
| 373 | 375 | } |
| 374 | 376 | ?> |
| @@ -416,9 +418,10 @@ | ||
| 416 | 418 | </label> |
| 417 | 419 | <?php endforeach; ?> |
| 418 | 420 | </div> |
| 419 | 421 | <label><small><?php esc_html_e("To set the ChatBot's tone and character set a system message according to your need",'chatbot'); ?></small></label></br> |
| 420 | - <label><small><?php esc_html_e("Example: You are a helpful and intelligent assistant for the website " . site_url() . ". Use live website data and the provided context to respond accurately and briefly. Stay relevant and do not introduce additional topics.",'chatbot'); ?></small></label> | |
| 422 | + <?php /* translators: %s: website URL. */ ?> | |
| 423 | + <label><small><?php printf( esc_html__( 'Example: You are a helpful and intelligent assistant for the website %s. Use live website data and the provided context to respond accurately and briefly. Stay relevant and do not introduce additional topics.', 'chatbot' ), esc_url( site_url() ) ); ?></small></label> | |
| 421 | 424 | </div> |
| 422 | 425 | <div class="form-check form-switch my-4"> |
| 423 | 426 | <input class="form-check-input" type="checkbox" <?php echo (get_option('context_awareness_enabled') == '1') ? esc_attr( 'checked','chatbot') :'';?> role="switch" value="" id="is_context_awareness_enabled"> |
| 424 | 427 | <label class="form-check-label" for="is_context_awareness_enabled"> |