Plugin Directory

Changeset 2476515


Ignore:
Timestamp:
02/17/2021 04:30:23 PM (5 years ago)
Author:
dsky
Message:

add option to disable js plugin

Location:
site-search-360/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • site-search-360/trunk/class-sitesearch360-plugin.php

    r2409220 r2476515  
    647647                $type = get_option("ss360_sr_type");
    648648
     649                $should_inject_search = get_option("ss360_inject_search");
     650                if ($should_inject_search == null) {
     651                    $should_inject_search = true;
     652                } else {
     653                    $should_inject_search = $should_inject_search == 1;
     654                }
     655               
    649656                if ($type == null) {
    650657                    $type = "full";
    651658                }
    652                 if ($type != "filter") {
     659
     660                if ($type != "filter"  && $should_inject_search) {
    653661                    if($type!='full'){
    654662                        if(isset($configuration['searchBox'])){unset($configuration['searchBox']['searchButton']);}
     
    656664                    }
    657665                    ?>
    658                     <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.20'; echo $ss360_v; ?> -->
     666                    <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.21'; echo $ss360_v; ?> -->
    659667                    <script type="text/javascript">
    660668                        var ss360Config = <?php echo json_encode($configuration); ?>;
  • site-search-360/trunk/class-sitesearch360-tracker.php

    r2409220 r2476515  
    8383        }
    8484
    85         $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.20';
     85        $data['version'] = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.21';
    8686
    8787        $args = array(
  • site-search-360/trunk/readme.txt

    r2409220 r2476515  
    66Requires at least: 4.0.0
    77Tested up to: 5.5
    8 Stable tag: 1.1.20
     8Stable tag: 1.1.21
    99Requires PHP: 5.2.4
    1010License: GPLv2
     
    7878
    7979== Changelog ==
     80= 1.1.21 =
     81* Add option to disable the js plugin.
     82
    8083= 1.1.20 =
    8184* Add placeholder attribute to shortcodes and widgets.
  • site-search-360/trunk/sitesearch360-admin-page.php

    r2318095 r2476515  
    145145        $ss360_is_logging_in = true;
    146146        include('views/sitesearch360-login-page.php');
    147     } else  {
     147    } else if($_POST['action'] === 'ss360_enablePlugin') {
     148        update_option('ss360_inject_search', isset($_POST['ss360Enabled']) ? 1 : 0);
     149        include('views/sitesearch360-dashboard.php');
     150    } else {
    148151        include('views/sitesearch360-dashboard.php');
    149152    }
  • site-search-360/trunk/sitesearch360.php

    r2409220 r2476515  
    66Description: Site Search 360 enhances and improves your standard WordPress search with search suggests, autocompletion, semantic search, and a whole lot of customization. Also, you'll be amazed of how much faster you get relevant search results.
    77Author: SEMKNOX GmbH
    8 Version: 1.1.20
     8Version: 1.1.21
    99Author URI: https://sitesearch360.com
    1010Text Domain: site-search-360
     
    1212*/
    1313
    14 define( 'SITESEARCH360_VERSION', '1.1.20' );
     14define( 'SITESEARCH360_VERSION', '1.1.21' );
    1515
    1616require_once 'class-sitesearch360-widget.php';
  • site-search-360/trunk/uninstall.php

    r2347842 r2476515  
    1212    'ss360_is_indexed', 'ss360_is_configured', 'ss360_config_midifications', 'ss360_review_interaction', 'ss360_plugin_version', 'ss360_indexing_mode',
    1313    'ss360_old_indexing_notice', 'ss360_active_plan', 'ss360_data_points', 'ss360_inactive_dp', 'ss360_renamed_dp', 'ss360_installation_id', 'ss360_config_modifications',
    14     'ss360_sync_on_save', 'ss360_sync_on_status','ss360_sync_on_future','ss360_sync_on_delete', 'ss360_callbacks', 'ss360_acf_def', 'ss360_woocommerce_categories', 'ss360_woocommerce_filters', 'ss360_selected_menus', 'ss360_page_limit');
     14    'ss360_sync_on_save', 'ss360_sync_on_status','ss360_sync_on_future','ss360_sync_on_delete', 'ss360_callbacks', 'ss360_acf_def', 'ss360_woocommerce_categories', 'ss360_woocommerce_filters', 'ss360_selected_menus', 'ss360_page_limit',
     15    'ss360_inject_search');
    1516
    1617global $wpdb;
  • site-search-360/trunk/views/sitesearch360-dashboard.php

    r2215731 r2476515  
    77    $ss360_page = !empty($_POST) && isset($_POST['page']) ? $_POST['page'] : 1;
    88    $ss360_integration_type = $ss360_plugin->getType();
     9    $ss360_inject_search = true;
     10    if (get_option("ss360_inject_search") === 0) {
     11        $ss360_inject_search = false;
     12    }
    913    if($ss360_is_configured==null){
    1014        if($ss360_page > 3 || ($ss360_integration_type=='filter' && $ss360_page>2)){
     
    1519    }
    1620    $ss360_jwt = $ss360_client->presign();
     21    if(!isset($requestUri)) {
     22        $requestUri = esc_url($_SERVER['REQUEST_URI']);
     23    }
    1724?>
    1825
     
    7683        </div>
    7784        <?php include('sitesearch360-index-sync.php') ?>
     85        <?php if($ss360_integration_type != 'filter') { ?>
     86        <div class="wrapper wrapper--narrow">
     87            <div class="block block--first">
     88                <h2><?php esc_html_e('Search Plugin Settings', 'site-search-360') ?></h2>
     89                <form id="inject-search" name="ss360_disable_plugin" method="post" action="<?php echo $requestUri; ?>" >
     90                    <?php wp_nonce_field(); ?>
     91                    <input type="hidden" name="action" value="ss360_enablePlugin">
     92                    <label class="checkbox">
     93                        <?php esc_html_e('enable search plugin', 'site-search-360') ?>
     94                        <input class="fake-hide" type="checkbox" id="ss360_enable_plugin_input" name="ss360Enabled" <?php echo $ss360_inject_search ? 'checked' : ''?>/>
     95                        <span class="checkbox_checkmark"></span>
     96                    </label>
     97                    <div class="flex flex--center w-100 m-t-1">
     98                        <button class="button button--padded" type="submit"><?php esc_html_e('Save', 'site-search-360'); ?></button>
     99                    </div>
     100                </form>
     101            </div>
     102        </div>
     103        <?php } ?>
    78104        <?php include('sitesearch360-contact.php') ?>
    79105    <?php } ?>
Note: See TracChangeset for help on using the changeset viewer.