Plugin Directory

Changeset 2300273


Ignore:
Timestamp:
05/07/2020 07:16:57 PM (6 years ago)
Author:
sheetdb
Message:

new handlebars library version

Location:
sheetdb/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sheetdb/trunk/readme.txt

    r2255959 r2300273  
    66Tested up to: 5.4.0
    77Requires PHP: 5.4
    8 Stable tag: 1.0.3
     8Stable tag: 1.0.4
    99License: GPLv2 or later
    1010
  • sheetdb/trunk/sheetdb.php

    r2255953 r2300273  
    66Plugin name: SheetDB
    77Description: The SheetDB wordpress plugin allows you to easily add content from Google Spreadsheet to your wordpress site.
    8 Version: 1.0.3
     8Version: 1.0.4
    99Author: SheetDB
    1010Author URI: https://sheetdb.io/
     
    3737            add_shortcode('sheetdb', [$this, 'sheetdb_shortcode']);
    3838            add_shortcode('sheetdb-slot', [$this, 'sheetdb_slot_shortcode']);
    39             wp_enqueue_script( 'sheetdb-js', plugins_url('assets/js/sheetdb-handlebars-1.1.0.js', __FILE__) );
     39            wp_enqueue_script( 'sheetdb-js', plugins_url('assets/js/sheetdb-handlebars-1.1.1.js', __FILE__) );
    4040        }
    4141
     
    4949            isset($atts['offset']) ? $offset = $atts['offset'] : $offset = null;
    5050            isset($atts['search']) ? $search = $atts['search'] : $search = null;
     51            isset($atts['search-mode']) ? $searchMode = $atts['search-mode'] : $searchMode = null;
    5152            isset($atts['sort-by']) ? $sortBy = $atts['sort-by'] : $sortBy = null;
    5253            isset($atts['sort-order']) ? $sortOrder = $atts['sort-order'] : $sortOrder = null;
     
    5556            if (!$url) return 'Use URL attribute with the SheetDB shortcode.';
    5657
    57             $additionalCode = $this->makeAdditionalCode($sheet, $limit, $offset, $search, $sortBy, $sortOrder, $sortMethod, $save);
     58            $additionalCode = $this->makeAdditionalCode($sheet, $limit, $offset, $search, $searchMode, $sortBy, $sortOrder, $sortMethod, $save);
    5859
    5960            return "<{$element} data-sheetdb-url=\"{$url}\"{$additionalCode}>{$content}</{$element}>";
     
    6768        }
    6869
    69         private function makeAdditionalCode($sheet, $limit, $offset, $search, $sortBy, $sortOrder, $sortMethod, $save) {
     70        private function makeAdditionalCode($sheet, $limit, $offset, $search, $searchMode, $sortBy, $sortOrder, $sortMethod, $save) {
    7071            $additionalCode = '';
    7172            if ($sheet) {
     
    8081            if ($search) {
    8182                $additionalCode .= ' data-sheetdb-search="' . $search . '"';
     83            }
     84            if ($searchMode) {
     85                $additionalCode .= ' data-sheetdb-search-mode="' . $searchMode . '"';
    8286            }
    8387            if ($sortBy) {
Note: See TracChangeset for help on using the changeset viewer.