=== SheetDB ===
Contributors: Sheet2DB
Tags: JSON, shortcode, Google Sheets, dynamic content
Requires at least: 5.0
Tested up to: 5.8
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

== Description ==

The Sheet2DB WordPress plugin enables you to seamlessly integrate and display content from Google Spreadsheets on your WordPress site. With this plugin, you can dynamically fetch data and render it using simple shortcodes.

== How to Use ==

To add content, use the shortcode in the following format:

    [sheet2db url="https://api.sheet2db.com/v1/CONNECTION_ID"][/sheet2db]

== Features ==

- **Dynamic Content Rendering**: The content enclosed within the shortcode will be rendered as many times as there are rows in the spreadsheet, excluding the first row (which contains the column names).
- **Simple Placeholder Syntax**: Use double braces notation `{{column_name}}` to reference any column value from your spreadsheet.

== Example ==

Given a spreadsheet with columns `id` and `name`, you can display its content with:

    [sheet2db url="https://api.sheet2db.com/v1/55da83dc-6059-4cd0-816b-801016fdf88c"]
        {{id}} – {{name}}
    [/sheet2db]

Each row from the spreadsheet will be rendered according to the template inside the shortcode.

To add a data table, use the shortcode in the following format:

    [sheet2db_table id="CONNECTION_ID" title="Table Title" tableBg="bg-white" headerBg="bg-gray-200" darkMode="false" fontFamily="Arial, sans-serif" sortableColumns="column1,column2" striped="true" enableSearch="true" limit="10" offset="0" sheet="Sheet1"]

**Attributes:**

- `id`: (Required) The unique identifier of your Sheet2DB connection.
- `title`: (Optional) The title of the table.
- `table_bg`: (Optional) CSS class for the table background.
- `heade_bg`: (Optional) CSS class for the table header background.
- `dark_mode`: (Optional) Enable dark mode. Use "true" or "false".
- `font_family`: (Optional) Specify a font family for the table text.
- `sortable_columns`: (Optional) Comma-separated list of columns that should be sortable.
- `striped`: (Optional) Enable striped rows. Use "true" or "false".
- `enable_search`: (Optional) Enable search functionality. Use "true" or "false".
- `limit`: (Optional) Limit the number of rows to display.
- `offset`: (Optional) Offset the starting row.
- `sheet`: (Optional) Specify the sheet name if your Google Sheets document contains multiple sheets.

**Features:**

- **Dynamic Data Display**: Fetch and display data from Google Sheets dynamically.
- **Sortable Columns**: Enable sorting on specific columns.
- **Dark Mode Support**: Optionally enable dark mode for the table.
- **Search Functionality**: Optionally include a search input to filter table rows.
- **Custom Styling**: Customize the table's appearance using CSS classes and font families.

== Example Spreadsheet ==

You can refer to this example spreadsheet document for testing and illustration purposes.

By using the SheetDB plugin, you can easily manage and display dynamic data from Google Spreadsheets, making your content management more efficient and flexible.

== Example Table ==

Given a spreadsheet with columns `id`, `name`, and `age`, you can display its content in a sortable, searchable table with:

    [sheet2db_table id="55da83dc-6059-4cd0-816b-801016fdf88c" title="User Data" table_bg="bg-white" header_bg="bg-gray-200" dark_mode="true" font_family="Arial, sans-serif" sortable_columns="name,age" striped="true" enable_search="true" limit="10" offset="0" sheet="Sheet1"]

This will render a table with the specified attributes, enabling sorting on the `name` and `age` columns, and providing a search input to filter rows.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/sheet2db-plugin` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Sign Up & Create an API Connection on https://sheet2db.com
4. Use shortcodes in any post or page.

== Changelog ==

= 1.0.0 =
* Initial release.
