Plugin Directory

Changeset 2509036


Ignore:
Timestamp:
04/04/2021 06:32:03 PM (5 years ago)
Author:
sheetdb
Message:

add sheet attribute to the readme file

Location:
sheetdb/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sheetdb/trunk/readme.txt

    r2485382 r2509036  
    2525 * limit - The number of rows that should be returned
    2626 * offset - Row from which it should start (how many rows to skip)
     27 * sheet - If you want to use a different sheet than the first one (default), enter the name of the tab you want to use here.
    2728 * search - You can search for specific data in your sheet. If you want to use more than one condition join them using & symbol. Example: search="name=Tom&age=15"
    2829* sort-by - The column you want to sort by
  • sheetdb/trunk/sheetdb.php

    r2361820 r2509036  
    11<?php
     2
    23/**
    34 * @package SheetDB
     
    3334// Main Plugin Class
    3435if (!class_exists('WordpressSheetDB')) {
    35     class WordpressSheetDB {
    36         public function __construct() {
     36    class WordpressSheetDB
     37    {
     38        public function __construct()
     39        {
    3740            add_shortcode('sheetdb', [$this, 'sheetdb_shortcode']);
    3841            add_shortcode('sheetdb-slot', [$this, 'sheetdb_slot_shortcode']);
     
    4144        }
    4245
    43         public function enqueueAssets() {
    44             wp_enqueue_script( 'sheetdb-js', plugins_url('assets/js/sheetdb-handlebars-1.1.5.js', __FILE__) );
     46        public function enqueueAssets()
     47        {
     48            wp_enqueue_script('sheetdb-js', plugins_url('assets/js/sheetdb-handlebars-1.1.5.js', __FILE__));
    4549        }
    4650
    47         public function sheetdb_shortcode($atts, $content) {
     51        public function sheetdb_shortcode($atts, $content)
     52        {
    4853            isset($atts['url']) ? $url = $atts['url'] : $url = null;
    4954            isset($atts['element']) ? $element = $atts['element'] : $element = "div";
     
    6772        }
    6873
    69         public function sheetdb_slot_shortcode($atts, $content) {
     74        public function sheetdb_slot_shortcode($atts, $content)
     75        {
    7076            isset($atts['slot']) ? $slot = $atts['slot'] : $slot = null;
    7177            isset($atts['element']) ? $element = $atts['element'] : $element = "div";
     
    7480        }
    7581
    76         private function makeAdditionalCode($sheet, $limit, $offset, $search, $searchMode, $sortBy, $sortOrder, $sortMethod, $sortDateFormat, $save) {
     82        private function makeAdditionalCode($sheet, $limit, $offset, $search, $searchMode, $sortBy, $sortOrder, $sortMethod, $sortDateFormat, $save)
     83        {
    7784            $additionalCode = '';
    7885            if ($sheet) {
Note: See TracChangeset for help on using the changeset viewer.