Plugin Directory

Changeset 2356176


Ignore:
Timestamp:
08/10/2020 01:22:54 PM (5 years ago)
Author:
dsky
Message:

include/exclude shortcode

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

Legend:

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

    r2347842 r2356176  
    7474
    7575    public function searchbox_shortcode($attrs) {
    76         $a = shortcode_atts(array('style' => ''), $attrs);
    77         return '<input class="ss360-searchbox" type="search" style="'.$a['style'].'"'.($this->getType()!='full'?' name="s"':'').'>';
     76        $keys = ['include', 'exclude', 'include-suggest', 'exclude-suggest'];
     77        $a = shortcode_atts(array('style' => '', 'include' => NULL, 'exclude' => NULL, 'include-suggest' => NULL, 'exclude-suggest' => NULL), $attrs);
     78       
     79        $dataStr = '';
     80        foreach($keys as $key) {
     81            if (isset($a[$key]) && $a[$key] !== NULL) {
     82                $dataStr = $dataStr . ' data-ss360-' . $key . '="[' . $a[$key] . ']"';
     83            }
     84        }
     85       
     86        return '<input class="ss360-searchbox" type="search" style="'.$a['style'].'"'.($this->getType()!='full'?' name="s"':'').$dataStr.'>';
    7887    }
    7988
     
    642651                    }
    643652                    ?>
    644                     <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.16'; echo $ss360_v; ?> -->
     653                    <!-- Site Search 360 WP v<?php $ss360_v = defined('SITESEARCH360_VERSION') ? SITESEARCH360_VERSION : '1.1.17'; echo $ss360_v; ?> -->
    645654                    <script type="text/javascript">
    646655                        var ss360Config = <?php echo json_encode($configuration); ?>;
  • site-search-360/trunk/class-sitesearch360-tracker.php

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

    r2347842 r2356176  
    66Requires at least: 4.0.0
    77Tested up to: 5.4.2
    8 Stable tag: 1.1.16
     8Stable tag: 1.1.17
    99Requires PHP: 5.2.4
    1010License: GPLv2
     
    7878
    7979== Changelog ==
     80= 1.1.17 =
     81* Include/exclude content groups attribute for shortcodes.
     82
    8083= 1.1.16 =
    8184* Indexing fix.
  • site-search-360/trunk/sitesearch360.php

    r2347842 r2356176  
    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.16
     8Version: 1.1.17
    99Author URI: https://sitesearch360.com
    1010Text Domain: site-search-360
     
    1212*/
    1313
    14 define( 'SITESEARCH360_VERSION', '1.1.16' );
     14define( 'SITESEARCH360_VERSION', '1.1.17' );
    1515
    1616require_once 'class-sitesearch360-widget.php';
Note: See TracChangeset for help on using the changeset viewer.