Plugin Directory

Changeset 3331599


Ignore:
Timestamp:
07/21/2025 03:29:27 PM (8 months ago)
Author:
ansera01
Message:

Tagging version 1.1.1

Location:
ansera-search
Files:
256 added
3 edited
9 copied

Legend:

Unmodified
Added
Removed
  • ansera-search/tags/1.1.1/ansera_search.php

    r3331475 r3331599  
    33 * Plugin Name: Ansera Search
    44 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content.
    5  * Version: 1.1.0
     5 * Version: 1.1.1
    66 * Author: Ansera.AI
    77 * Author URI:  https://www.ansera.ai/
     
    963963                $custom_button_hover_color = !empty($_POST['ansera_custom_button_hover_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_custom_button_hover_color'])) : '#555555';
    964964                $custom_input_border_color = !empty($_POST['ansera_custom_input_border_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_custom_input_border_color'])) : '#e2e8f0';
    965                
     965                $custom_input_answer_bg_color = !empty($_POST['ansera_search_answer_bg_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_answer_bg_color'])) : '#e2e8f0';
     966                $custom_input_tiles_bg_color = !empty($_POST['ansera_search_tiles_bg_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_tiles_bg_color'])) : '#e2e8f0';
     967                $custom_input_tiles_text_color = !empty($_POST['ansera_search_tiles_text_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_tiles_text_color'])) : '#e2e8f0';
     968                $ansera_chat_header_text = !empty($_POST['ansera_chat_header_text']) ? $_POST['ansera_chat_header_text'] : '';
     969
    966970                update_option('ansera_search_custom_bg_color', $custom_bg_color);
    967971                update_option('ansera_search_custom_text_color', $custom_text_color);
     
    969973                update_option('ansera_search_custom_button_hover_color', $custom_button_hover_color);
    970974                update_option('ansera_search_custom_input_border_color', $custom_input_border_color);
     975                update_option('ansera_search_answer_bg_color', $custom_input_answer_bg_color);
     976                update_option('ansera_search_tiles_bg_color', $custom_input_tiles_bg_color);
     977                //update_option('ansera_chat_header_text', $ansera_chat_header_text);
     978                update_option('ansera_search_tiles_text_color', $custom_input_tiles_text_color);
     979
     980
     981
     982               
     983            }
     984            else{
     985
     986
     987                update_option('ansera_search_custom_bg_color', '');
     988                update_option('ansera_search_custom_text_color', '');
     989                update_option('ansera_search_custom_button_bg_color', '');
     990                update_option('ansera_search_custom_button_hover_color','');
     991                update_option('ansera_search_custom_input_border_color','');
     992                update_option('ansera_search_answer_bg_color', '');
     993                update_option('ansera_search_tiles_bg_color', '');
     994                //update_option('ansera_chat_header_text', '');
     995                update_option('ansera_search_tiles_text_color', '');
     996
    971997            }
    972998        }
     
    10001026        {
    10011027            update_option('ansera_search_send_chat_to_email_text', $ansera_search_send_chat_to_email_text);
     1028        }
     1029
     1030
     1031         $ansera_chat_header_text = !empty($_POST['ansera_chat_header_text']) ? sanitize_text_field(wp_unslash($_POST['ansera_chat_header_text'])) : '';
     1032        if(!empty($ansera_chat_header_text) && $ansera_chat_header_text != get_option('ansera_chat_header_text'))
     1033        {
     1034            update_option('ansera_chat_header_text', $ansera_chat_header_text);
    10021035        }
    10031036
     
    12871320                            <tr id="ansera-custom-colors-row" style="display: none;">
    12881321                                <th style="padding-top: 20px;">Custom Color Palette</th>
     1322                               
    12891323                                <td colspan="3" style="padding-top: 20px;">
    12901324                                    <div class="color-grid">
     
    12951329                                                    id="ansera_custom_bg_color"
    12961330                                                    name="ansera_custom_bg_color"
    1297                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_bg_color', '#ffffff')); ?>"
     1331                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_bg_color', '#000000') ?? '#000000'); ?>"
    12981332                                                />
    1299                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_bg_color', '#ffffff')); ?></span>
     1333                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_bg_color', '#000000')); ?></span>
    13001334                                            </div>
    13011335                                        </div>
     
    13071341                                                    id="ansera_custom_text_color"
    13081342                                                    name="ansera_custom_text_color"
    1309                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_text_color', '#1a202c')); ?>"
     1343                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_text_color', '#000000') ?? '#000000'); ?>"
    13101344                                                />
    1311                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_text_color', '#1a202c')); ?></span>
     1345                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_text_color', '#000000')); ?></span>
    13121346                                            </div>
    13131347                                        </div>
     
    13191353                                                    id="ansera_custom_button_bg_color"
    13201354                                                    name="ansera_custom_button_bg_color"
    1321                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_button_bg_color', '#333333')); ?>"
     1355                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_button_bg_color', '#000000') ?? '#000000'); ?>"
    13221356                                                />
    1323                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_bg_color', '#333333')); ?></span>
     1357                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_bg_color', '#000000')); ?></span>
    13241358                                            </div>
    13251359                                        </div>
     
    13311365                                                    id="ansera_custom_button_hover_color"
    13321366                                                    name="ansera_custom_button_hover_color"
    1333                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_button_hover_color', '#555555')); ?>"
     1367                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_button_hover_color', '#000000') ?? '#000000'); ?>"
    13341368                                                />
    1335                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_hover_color', '#555555')); ?></span>
     1369                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_hover_color', '#000000')); ?></span>
    13361370                                            </div>
    13371371                                        </div>
     
    13431377                                                    id="ansera_custom_input_border_color"
    13441378                                                    name="ansera_custom_input_border_color"
    1345                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_input_border_color', '#e2e8f0')); ?>"
     1379                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_input_border_color', '#000000') ?? '#000000'); ?>"
    13461380                                                />
    1347                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_input_border_color', '#e2e8f0')); ?></span>
     1381                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_input_border_color', '#000000')); ?></span>
    13481382                                            </div>
    13491383                                        </div>
     1384                                        <!-- -->
     1385                                        <div class="color-item">
     1386                                            <label for="ansera_search_tiles_bg_color">Tiles Background Color</label>
     1387                                            <div class="color-input-group">
     1388                                                <input type="color"
     1389                                                    id="ansera_search_tiles_bg_color"
     1390                                                    name="ansera_search_tiles_bg_color"
     1391                                                    value="<?php echo esc_attr(get_option('ansera_search_tiles_bg_color', '#000000') ?? '#000000'); ?>"
     1392                                                />
     1393                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_tiles_bg_color', '#000000') ?? '#000000'); ?></span>
     1394                                            </div>
     1395                                        </div>
     1396
     1397                                        <div class="color-item">
     1398                                            <label for="ansera_search_tiles_text_color">Tiles Text Color</label>
     1399                                            <div class="color-input-group">
     1400                                                <input type="color"
     1401                                                    id="ansera_search_tiles_text_color"
     1402                                                    name="ansera_search_tiles_text_color"
     1403                                                    value="<?php echo esc_attr(get_option('ansera_search_tiles_text_color', '#000000'))?? '#000000'; ?>"
     1404                                                />
     1405                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_tiles_text_color', '#000000')); ?></span>
     1406                                            </div>
     1407                                        </div>
     1408
     1409
     1410                                        <div class="color-item">
     1411                                            <label for="ansera_search_answer_bg_color">Answer Area Background Color</label>
     1412                                            <div class="color-input-group">
     1413                                                <input type="color"
     1414                                                    id="ansera_search_answer_bg_color"
     1415                                                    name="ansera_search_answer_bg_color"
     1416                                                    value="<?php echo esc_attr(get_option('ansera_search_answer_bg_color', '#000000') ?? '#000000'); ?>"
     1417                                                />
     1418                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_answer_bg_color', '#000000')); ?></span>
     1419                                            </div>
     1420                                        </div>
     1421                                        <!-- -->
    13501422                                    </div>
    13511423                                    <div class="color-preview-section">
     
    13571429                                </td>
    13581430                            </tr>
     1431                           
     1432                         
    13591433                           
    13601434                            <!-- Search Type -->
     
    13891463                            </tr>
    13901464                            <!-- Search Type -->
     1465
     1466                            <tr id="ansera-custom-colors-textbox-row">
     1467                            <th><b> Chat widget Header Help Text </b> </th>   
     1468                           
     1469                               
     1470                                <td colspan="4" style="padding-bottom: 0;">
     1471                                    <input type="text" id="ansera_chat_header_text" name="ansera_chat_header_text" style="width: 60%; font-size: 14px;" placeholder="Enter a label or note for your custom palette (optional)" value="<?php echo esc_attr(get_option('ansera_chat_header_text', '')); ?>" />
     1472                                </td>
     1473                            </tr>
     1474
     1475
    13911476                            <tr>
    13921477                                <th><label id="ansera-logo-label" for="ansera-logo">Search Icon</label></th>
     
    14661551                                <td colspan="3"><input style="width: 80%;" type="text" name="ansera_search_send_chat_to_email_text" value="<?php echo esc_attr( stripslashes( get_option('ansera_search_send_chat_to_email_text') ) ); ?>" />
    14671552                            </tr>
     1553                           
    14681554                            <!-- <tr><td></td><td><input type="submit" class="button button-primary" name="submit" value="Update" id="ansera-update-btn" /> -->
    14691555                            <tr><th><input style="margin-left: 10px;" type="submit" class="button button-primary" name="submit" value="Save Changes" id="ansera-update-btn" /></th></tr>
     
    14741560                    // Add this after the color preview section
    14751561                    ?>
    1476                     <div class="color-actions" style="margin-top: 15px;">
     1562                    <!-- <div class="color-actions" style="margin-top: 15px;">
    14771563                        <button type="button" id="ansera-reset-to-theme-colors" class="button button-secondary">
    14781564                            <i class="fas fa-sync-alt" style="margin-right: 5px;"></i>
     
    14821568                            Reset all colors to match your current WordPress theme
    14831569                        </small>
    1484                     </div>
     1570                    </div> -->
    14851571                    <?php
    14861572                    break;
     
    20162102            'ansera_search_custom_button_hover_color' => get_option('ansera_search_custom_button_hover_color', '#555555'),
    20172103            'ansera_search_custom_input_border_color' => get_option('ansera_search_custom_input_border_color', '#e2e8f0'),
     2104            'ansera_search_answer_bg_color' => get_option('ansera_search_answer_bg_color', '#e2e8f0'),
     2105            'ansera_search_tiles_bg_color' => get_option('ansera_search_tiles_bg_color', '#e2e8f0'),
     2106            'ansera_chat_header_text' => get_option('ansera_chat_header_text', ''),
     2107            'ansera_search_tiles_text_color' => get_option('ansera_search_tiles_text_color', '#e2e8f0')
    20182108            /******* Ansera CDN Variables *******/
    20192109        ]
  • ansera-search/tags/1.1.1/js/ansera_search_admin_settings.js

    r3331475 r3331599  
    4040      const widthLabel = document.getElementById('ansera-logo-width-label');
    4141      const logoLabel = document.getElementById('ansera-logo-label');
    42 
     42      const customHeaderText = jQuery('#ansera-custom-colors-textbox-row')
    4343      function ansera_search_updateLabelsByType() {
    4444        const selectedType = document.querySelector('input[name="ansera_search_type"]:checked');
     
    4848            widthLabel.textContent = 'Search Bar Icon Width';
    4949            logoLabel.textContent = 'Search Bar Icon Options';
     50            customHeaderText.hide()
     51
    5052        } else if (selectedType.value == 'click-icon') {
    5153            heightLabel.textContent = 'Search Icon Height';
    5254            widthLabel.textContent = 'Search Icon Width';
    5355            logoLabel.textContent = 'Search Icon Options';
     56            customHeaderText.hide()
     57        }
     58        else{
     59            customHeaderText.show()
    5460        }
    5561      }
     
    874880        const customTheme = jQuery('input[name="ansera_search_theme"][value="custom"]');
    875881        const customColorsRow = jQuery('#ansera-custom-colors-row');
    876        
     882        const customHeaderWidget = jQuery('#ansera-custom-colors-textbox-row')       
    877883        if (customTheme.is(':checked')) {
    878884            customColorsRow.show();
     885           // customHeaderWidget.show()
    879886        } else {
    880887            customColorsRow.hide();
     888           // customHeaderWidget.hide()
    881889        }
    882890    }
  • ansera-search/tags/1.1.1/readme.txt

    r3331475 r3331599  
    55Tested up to: 6.8
    66Requires PHP: 7.2
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • ansera-search/trunk/ansera_search.php

    r3331475 r3331599  
    33 * Plugin Name: Ansera Search
    44 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content.
    5  * Version: 1.1.0
     5 * Version: 1.1.1
    66 * Author: Ansera.AI
    77 * Author URI:  https://www.ansera.ai/
     
    963963                $custom_button_hover_color = !empty($_POST['ansera_custom_button_hover_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_custom_button_hover_color'])) : '#555555';
    964964                $custom_input_border_color = !empty($_POST['ansera_custom_input_border_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_custom_input_border_color'])) : '#e2e8f0';
    965                
     965                $custom_input_answer_bg_color = !empty($_POST['ansera_search_answer_bg_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_answer_bg_color'])) : '#e2e8f0';
     966                $custom_input_tiles_bg_color = !empty($_POST['ansera_search_tiles_bg_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_tiles_bg_color'])) : '#e2e8f0';
     967                $custom_input_tiles_text_color = !empty($_POST['ansera_search_tiles_text_color']) ? sanitize_hex_color(wp_unslash($_POST['ansera_search_tiles_text_color'])) : '#e2e8f0';
     968                $ansera_chat_header_text = !empty($_POST['ansera_chat_header_text']) ? $_POST['ansera_chat_header_text'] : '';
     969
    966970                update_option('ansera_search_custom_bg_color', $custom_bg_color);
    967971                update_option('ansera_search_custom_text_color', $custom_text_color);
     
    969973                update_option('ansera_search_custom_button_hover_color', $custom_button_hover_color);
    970974                update_option('ansera_search_custom_input_border_color', $custom_input_border_color);
     975                update_option('ansera_search_answer_bg_color', $custom_input_answer_bg_color);
     976                update_option('ansera_search_tiles_bg_color', $custom_input_tiles_bg_color);
     977                //update_option('ansera_chat_header_text', $ansera_chat_header_text);
     978                update_option('ansera_search_tiles_text_color', $custom_input_tiles_text_color);
     979
     980
     981
     982               
     983            }
     984            else{
     985
     986
     987                update_option('ansera_search_custom_bg_color', '');
     988                update_option('ansera_search_custom_text_color', '');
     989                update_option('ansera_search_custom_button_bg_color', '');
     990                update_option('ansera_search_custom_button_hover_color','');
     991                update_option('ansera_search_custom_input_border_color','');
     992                update_option('ansera_search_answer_bg_color', '');
     993                update_option('ansera_search_tiles_bg_color', '');
     994                //update_option('ansera_chat_header_text', '');
     995                update_option('ansera_search_tiles_text_color', '');
     996
    971997            }
    972998        }
     
    10001026        {
    10011027            update_option('ansera_search_send_chat_to_email_text', $ansera_search_send_chat_to_email_text);
     1028        }
     1029
     1030
     1031         $ansera_chat_header_text = !empty($_POST['ansera_chat_header_text']) ? sanitize_text_field(wp_unslash($_POST['ansera_chat_header_text'])) : '';
     1032        if(!empty($ansera_chat_header_text) && $ansera_chat_header_text != get_option('ansera_chat_header_text'))
     1033        {
     1034            update_option('ansera_chat_header_text', $ansera_chat_header_text);
    10021035        }
    10031036
     
    12871320                            <tr id="ansera-custom-colors-row" style="display: none;">
    12881321                                <th style="padding-top: 20px;">Custom Color Palette</th>
     1322                               
    12891323                                <td colspan="3" style="padding-top: 20px;">
    12901324                                    <div class="color-grid">
     
    12951329                                                    id="ansera_custom_bg_color"
    12961330                                                    name="ansera_custom_bg_color"
    1297                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_bg_color', '#ffffff')); ?>"
     1331                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_bg_color', '#000000') ?? '#000000'); ?>"
    12981332                                                />
    1299                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_bg_color', '#ffffff')); ?></span>
     1333                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_bg_color', '#000000')); ?></span>
    13001334                                            </div>
    13011335                                        </div>
     
    13071341                                                    id="ansera_custom_text_color"
    13081342                                                    name="ansera_custom_text_color"
    1309                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_text_color', '#1a202c')); ?>"
     1343                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_text_color', '#000000') ?? '#000000'); ?>"
    13101344                                                />
    1311                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_text_color', '#1a202c')); ?></span>
     1345                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_text_color', '#000000')); ?></span>
    13121346                                            </div>
    13131347                                        </div>
     
    13191353                                                    id="ansera_custom_button_bg_color"
    13201354                                                    name="ansera_custom_button_bg_color"
    1321                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_button_bg_color', '#333333')); ?>"
     1355                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_button_bg_color', '#000000') ?? '#000000'); ?>"
    13221356                                                />
    1323                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_bg_color', '#333333')); ?></span>
     1357                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_bg_color', '#000000')); ?></span>
    13241358                                            </div>
    13251359                                        </div>
     
    13311365                                                    id="ansera_custom_button_hover_color"
    13321366                                                    name="ansera_custom_button_hover_color"
    1333                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_button_hover_color', '#555555')); ?>"
     1367                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_button_hover_color', '#000000') ?? '#000000'); ?>"
    13341368                                                />
    1335                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_hover_color', '#555555')); ?></span>
     1369                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_button_hover_color', '#000000')); ?></span>
    13361370                                            </div>
    13371371                                        </div>
     
    13431377                                                    id="ansera_custom_input_border_color"
    13441378                                                    name="ansera_custom_input_border_color"
    1345                                                     value="<?php echo esc_attr(get_option('ansera_search_custom_input_border_color', '#e2e8f0')); ?>"
     1379                                                    value="<?php echo esc_attr(get_option('ansera_search_custom_input_border_color', '#000000') ?? '#000000'); ?>"
    13461380                                                />
    1347                                                 <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_input_border_color', '#e2e8f0')); ?></span>
     1381                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_custom_input_border_color', '#000000')); ?></span>
    13481382                                            </div>
    13491383                                        </div>
     1384                                        <!-- -->
     1385                                        <div class="color-item">
     1386                                            <label for="ansera_search_tiles_bg_color">Tiles Background Color</label>
     1387                                            <div class="color-input-group">
     1388                                                <input type="color"
     1389                                                    id="ansera_search_tiles_bg_color"
     1390                                                    name="ansera_search_tiles_bg_color"
     1391                                                    value="<?php echo esc_attr(get_option('ansera_search_tiles_bg_color', '#000000') ?? '#000000'); ?>"
     1392                                                />
     1393                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_tiles_bg_color', '#000000') ?? '#000000'); ?></span>
     1394                                            </div>
     1395                                        </div>
     1396
     1397                                        <div class="color-item">
     1398                                            <label for="ansera_search_tiles_text_color">Tiles Text Color</label>
     1399                                            <div class="color-input-group">
     1400                                                <input type="color"
     1401                                                    id="ansera_search_tiles_text_color"
     1402                                                    name="ansera_search_tiles_text_color"
     1403                                                    value="<?php echo esc_attr(get_option('ansera_search_tiles_text_color', '#000000'))?? '#000000'; ?>"
     1404                                                />
     1405                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_tiles_text_color', '#000000')); ?></span>
     1406                                            </div>
     1407                                        </div>
     1408
     1409
     1410                                        <div class="color-item">
     1411                                            <label for="ansera_search_answer_bg_color">Answer Area Background Color</label>
     1412                                            <div class="color-input-group">
     1413                                                <input type="color"
     1414                                                    id="ansera_search_answer_bg_color"
     1415                                                    name="ansera_search_answer_bg_color"
     1416                                                    value="<?php echo esc_attr(get_option('ansera_search_answer_bg_color', '#000000') ?? '#000000'); ?>"
     1417                                                />
     1418                                                <span class="color-value"><?php echo esc_html(get_option('ansera_search_answer_bg_color', '#000000')); ?></span>
     1419                                            </div>
     1420                                        </div>
     1421                                        <!-- -->
    13501422                                    </div>
    13511423                                    <div class="color-preview-section">
     
    13571429                                </td>
    13581430                            </tr>
     1431                           
     1432                         
    13591433                           
    13601434                            <!-- Search Type -->
     
    13891463                            </tr>
    13901464                            <!-- Search Type -->
     1465
     1466                            <tr id="ansera-custom-colors-textbox-row">
     1467                            <th><b> Chat widget Header Help Text </b> </th>   
     1468                           
     1469                               
     1470                                <td colspan="4" style="padding-bottom: 0;">
     1471                                    <input type="text" id="ansera_chat_header_text" name="ansera_chat_header_text" style="width: 60%; font-size: 14px;" placeholder="Enter a label or note for your custom palette (optional)" value="<?php echo esc_attr(get_option('ansera_chat_header_text', '')); ?>" />
     1472                                </td>
     1473                            </tr>
     1474
     1475
    13911476                            <tr>
    13921477                                <th><label id="ansera-logo-label" for="ansera-logo">Search Icon</label></th>
     
    14661551                                <td colspan="3"><input style="width: 80%;" type="text" name="ansera_search_send_chat_to_email_text" value="<?php echo esc_attr( stripslashes( get_option('ansera_search_send_chat_to_email_text') ) ); ?>" />
    14671552                            </tr>
     1553                           
    14681554                            <!-- <tr><td></td><td><input type="submit" class="button button-primary" name="submit" value="Update" id="ansera-update-btn" /> -->
    14691555                            <tr><th><input style="margin-left: 10px;" type="submit" class="button button-primary" name="submit" value="Save Changes" id="ansera-update-btn" /></th></tr>
     
    14741560                    // Add this after the color preview section
    14751561                    ?>
    1476                     <div class="color-actions" style="margin-top: 15px;">
     1562                    <!-- <div class="color-actions" style="margin-top: 15px;">
    14771563                        <button type="button" id="ansera-reset-to-theme-colors" class="button button-secondary">
    14781564                            <i class="fas fa-sync-alt" style="margin-right: 5px;"></i>
     
    14821568                            Reset all colors to match your current WordPress theme
    14831569                        </small>
    1484                     </div>
     1570                    </div> -->
    14851571                    <?php
    14861572                    break;
     
    20162102            'ansera_search_custom_button_hover_color' => get_option('ansera_search_custom_button_hover_color', '#555555'),
    20172103            'ansera_search_custom_input_border_color' => get_option('ansera_search_custom_input_border_color', '#e2e8f0'),
     2104            'ansera_search_answer_bg_color' => get_option('ansera_search_answer_bg_color', '#e2e8f0'),
     2105            'ansera_search_tiles_bg_color' => get_option('ansera_search_tiles_bg_color', '#e2e8f0'),
     2106            'ansera_chat_header_text' => get_option('ansera_chat_header_text', ''),
     2107            'ansera_search_tiles_text_color' => get_option('ansera_search_tiles_text_color', '#e2e8f0')
    20182108            /******* Ansera CDN Variables *******/
    20192109        ]
  • ansera-search/trunk/js/ansera_search_admin_settings.js

    r3331475 r3331599  
    4040      const widthLabel = document.getElementById('ansera-logo-width-label');
    4141      const logoLabel = document.getElementById('ansera-logo-label');
    42 
     42      const customHeaderText = jQuery('#ansera-custom-colors-textbox-row')
    4343      function ansera_search_updateLabelsByType() {
    4444        const selectedType = document.querySelector('input[name="ansera_search_type"]:checked');
     
    4848            widthLabel.textContent = 'Search Bar Icon Width';
    4949            logoLabel.textContent = 'Search Bar Icon Options';
     50            customHeaderText.hide()
     51
    5052        } else if (selectedType.value == 'click-icon') {
    5153            heightLabel.textContent = 'Search Icon Height';
    5254            widthLabel.textContent = 'Search Icon Width';
    5355            logoLabel.textContent = 'Search Icon Options';
     56            customHeaderText.hide()
     57        }
     58        else{
     59            customHeaderText.show()
    5460        }
    5561      }
     
    874880        const customTheme = jQuery('input[name="ansera_search_theme"][value="custom"]');
    875881        const customColorsRow = jQuery('#ansera-custom-colors-row');
    876        
     882        const customHeaderWidget = jQuery('#ansera-custom-colors-textbox-row')       
    877883        if (customTheme.is(':checked')) {
    878884            customColorsRow.show();
     885           // customHeaderWidget.show()
    879886        } else {
    880887            customColorsRow.hide();
     888           // customHeaderWidget.hide()
    881889        }
    882890    }
  • ansera-search/trunk/readme.txt

    r3331475 r3331599  
    55Tested up to: 6.8
    66Requires PHP: 7.2
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.