Plugin Directory

Changeset 3237124


Ignore:
Timestamp:
02/08/2025 09:54:02 PM (12 months ago)
Author:
ideastocode
Message:

Update to 1.0.1

Location:
custom-search-box
Files:
49 added
4 edited

Legend:

Unmodified
Added
Removed
  • custom-search-box/trunk/README.txt

    r3233021 r3237124  
    44Tags: Search box, Custom Search, file search, image search, Backend Search
    55Tested up to: 6.7
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5555== Changelog ==
    5656
     57= 1.0.1 =
     58* Minor Updates.
     59
    5760= 1.0.0 =
    5861* Initial release.
    5962
    6063== Upgrade Notice ==
    61 This is the initial release
     64Please update to 1.0.1 version
  • custom-search-box/trunk/admin/js/itc-custom-search.js

    r3233021 r3237124  
    1 document.getElementById('restore-defaults').addEventListener('click', function () {
    2     if (confirm('Are you sure you want to restore all settings to their default values?')) {
    3         const defaults = ITC_CSBP_Custom_Search_Box_Admin.defaults;
    4         Object.keys(defaults).forEach(key => {
    5             const input = document.querySelector(`[name="itc_csbp_design_customized_search_box[${key}]"]`);
    6             if (input) {
    7                 if (input.type === 'checkbox') {
    8                     input.checked = defaults[key];
    9                 } else if (input.type === 'color' || input.type === 'text') {
    10                     input.value = defaults[key];
    11                 } else if (input.tagName.toLowerCase() === 'select') {
    12                     input.value = defaults[key];
    13                 }
     1document.addEventListener("DOMContentLoaded", function () {
     2    // Check if we are on the correct page by looking for a unique element
     3    if (document.getElementById('custom-search-box-design-form')) {
     4        document.getElementById('restore-defaults').addEventListener('click', function () {
     5            if (confirm('Are you sure you want to restore all settings to their default values?')) {
     6                const defaults = ITC_CSBP_Custom_Search_Box_Admin.defaults;
     7                Object.keys(defaults).forEach(key => {
     8                    const input = document.querySelector(`[name="itc_csbp_design_customized_search_box[${key}]"]`);
     9                    if (input) {
     10                        if (input.type === 'checkbox') {
     11                            input.checked = defaults[key];
     12                        } else if (input.type === 'color' || input.type === 'text') {
     13                            input.value = defaults[key];
     14                        } else if (input.tagName.toLowerCase() === 'select') {
     15                            input.value = defaults[key];
     16                        }
     17                    }
     18                });
    1419            }
    1520        });
    1621    }
    1722});
    18 
  • custom-search-box/trunk/custom-search-box.php

    r3233021 r3237124  
    33/**
    44 * @link              https://ideastocode.com
    5  * @since             1.0.0
     5 * @since             1.0.1
    66 * @package           Custom Search Box
    77 *
     
    2424}
    2525
    26 define( 'ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION', '1.0.0' );
     26define( 'ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION', '1.0.1' );
    2727if ( ! defined( 'ITC_CSBP_CUSTOM_SEARCH_BOX_BASENAME' ) ) {
    2828    define( 'ITC_CSBP_CUSTOM_SEARCH_BOX_BASENAME', plugin_basename( __FILE__ ) );
  • custom-search-box/trunk/includes/BaseController.php

    r3233021 r3237124  
    1212                'title'     => __('Custom Search Box', 'custom-search-box'),
    1313                'slug'      =>'custom-search-box',
    14                 'version'   => ( defined( 'ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION' ) ) ? ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION: '1.0.0',
     14                'version'   => ( defined( 'ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION' ) ) ? ITC_CSBP_CUSTOM_SEARCH_BOX_VERSION: '1.0.1',
    1515                'settings'  =>'itc_csbp_custom_search_box_settings',
    1616            );
Note: See TracChangeset for help on using the changeset viewer.