=== Swiffle Grid ===
Contributors: charmettesbros
Tags: cards, csv, rss, swipeable, excel
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.3
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Any source. Any view. Anywhere. Swipe & flip grids from WordPress posts, CSV, XLSX and RSS/YouTube feeds — in Gutenberg or Elementor.

== Description ==

**Swiffle Grid lets you build dynamic data grids inside WordPress — using Gutenberg or Elementor — then embed them anywhere, including sites that don't run WordPress at all.**

Available in 14 languages out of the box.

Design cards and grids from your WordPress posts, a CSV or XLSX file, or an RSS feed (including a YouTube channel's video feed) — then publish with a lightweight HTML snippet that works on Shopify, Webflow, Wix, Squarespace, Ghost, static sites, mobile apps, or anywhere else HTML runs.

https://www.youtube.com/watch?v=xGqVRmEDlp0

### What you can build

- Content hubs and data‑driven landing pages
- Catalog‑style grids from a CSV or XLSX export
- Swipeable, flippable card galleries — including video galleries from a YouTube channel
- Headless or hybrid WordPress front‑ends
- Custom data explorers

### 🧩 Key Features

#### 🔹 Swipe & flip cards
A Tinder‑style swipe layout, with tap‑to‑flip card reveal — a built‑in interaction mode, usable with any data source.

#### 🔹 Build grids visually
Use Gutenberg or Elementor to design cards, grids, and layouts. No coding required.

#### 🔹 Built‑in translations
The plugin interface and grid labels are available in 14 languages out of the box — no translation plugin required.

#### 🔹 Connect your data
Fetch and display data from:
- WordPress posts
- CSV files
- Excel (XLSX) files
- RSS feeds (including a YouTube channel's video feed)

#### 🔹 Update by filename, not by link
CSV and XLSX sources — and any images referenced inside them — are matched by file name in your Media Library, not by a fixed attachment link. Upload a new version with the same file name, and every grid using it updates automatically, including on external, non‑WordPress embeds. No re‑linking, no broken sources.

#### 🔹 Embed anywhere
Publish your grid with a lightweight HTML snippet. Works on Shopify, Webflow, Wix, Squarespace, Ghost, static HTML, mobile apps, and any site that supports HTML.

#### 🔹 No CORS headaches
The embed is built to avoid CORS issues out of the box, so a grid behaves the same on any non‑WordPress site it's embedded in — as long as that site doesn't itself block iframes (e.g. via a strict Content-Security-Policy).

### Swiffle Grid PRO

A separate, paid companion plugin adds:
- **Live Google Sheets sync** — connect a grid to a Google Sheet; edit a cell, the grid updates everywhere, including on non‑WordPress sites.
- **A full remote WooCommerce store, anywhere** — browse, add to cart, save to a wishlist, and sign in from an external, non‑WordPress site. Checkout completes back on your WordPress store.
- **Custom connectors** — fetch data from any external API using a developer‑defined PHP connector.
- WooCommerce enhancements: color swatches, custom product options.

Learn more: https://swiffle-grid.com/

== Links ==
* Docs: https://swiffle-grid.com/getting-started-with-swiffle-grid-free/
* Teaser: https://swiffle-grid.com/teaser/

== Installation ==

1. Install the plugin from the WordPress plugin directory or upload it manually.
2. Activate the plugin.
3. Add the Swiffle Grid block in the Gutenberg editor, or the Swiffle Grid widget in Elementor.
4. Choose your data source.
5. Design your cards and layout.
6. Publish your grid and copy the embed snippet.
7. Paste the snippet into any external website or app.

== Frequently Asked Questions ==

= Can I use Swiffle Grid outside WordPress? =
Yes. Every grid can be embedded anywhere using a simple HTML snippet.

= What data sources are supported? =
WordPress posts, CSV files, XLSX files, and RSS feeds (including a YouTube channel's video feed) are supported out of the box. Live Google Sheets sync, WooCommerce, and custom API connectors are available through Swiffle Grid PRO, a separate companion plugin.

= Will the embed run into CORS or network‑blocking issues on another platform? =
The embed snippet is built to avoid CORS issues out of the box, so your grid behaves consistently across the platforms we've tested it on — the one exception is a site that blocks iframes itself (for example via a strict Content-Security-Policy), which no embed technology can work around.

= Does the embed work on Shopify, Webflow, Wix, or static sites? =
Yes. As long as the platform supports HTML and JavaScript, the embed works.

= Does Swiffle Grid work with Elementor, or only Gutenberg? =
Both. Grids can be designed and embedded using either Gutenberg or Elementor — neither is required over the other. If you use Elementor, version 3.5 or higher is required for the Swiffle widget to appear.

= Does it support WooCommerce? =
Not in this free plugin. Displaying WooCommerce products, and remote cart/wishlist/sign‑in features, are provided by Swiffle Grid PRO, a separate companion plugin.

= Can I display YouTube videos in a grid? =
Yes. Connect your YouTube channel's RSS feed as a source, then set the card action to flip — the back of each card plays the video. There's no dedicated YouTube connector; it works through the existing RSS source, combined with the swipe and flip layout options.

= If I upload a new version of my CSV or XLSX file, do my grids update automatically? =
Yes, as long as the new file has the same file name. Swiffle Grid matches CSV/XLSX sources by file name in your Media Library and always uses the most recent match — no need to re‑select the source or update any embed.

= Is the embed secure? =
Remote embeds only work for the URLs you explicitly authorize on the Swiffle Grid settings page, with per-source permissions you control.

= Can very long browsing sessions cause the page to reload on iPhone? =
On Safari for iOS specifically, extremely long, continuous scrolling sessions through very large grids can occasionally cause iOS to reload the page, due to Apple's own memory management on that browser. This is a known iOS Safari behavior, not specific to Swiffle Grid, and no data is lost when it happens — the grid simply reloads. This is rare in normal browsing and has not been observed on Chrome or Firefox for iOS, or on Android.

= Can I connect external APIs? =
Not in this free plugin. Developers can build custom PHP connectors to fetch data from any API through Swiffle Grid PRO.

= Does it work with caching plugins? =
Yes. The embed is designed to work well with caching and CDN layers.

= Does it work with headless WordPress? =
Yes. Swiffle Grid is ideal for headless or hybrid architectures.

== External services ==

This plugin connects to a small number of external services to provide some of its features. Each one is described below, including what is sent and when.

**1. Remote RSS feeds you configure**
Swiffle Grid's core purpose is to display data from a source you choose — including, optionally, an RSS feed URL you enter yourself. When a block is set to fetch from an RSS URL, this plugin makes a server‑side HTTP request to that exact URL to retrieve its content. No data about your site or its visitors is sent beyond what is normally included in an HTTP request (like the User‑Agent). This only happens for the RSS URLs you explicitly configure — nothing is fetched by default. CSV and XLSX sources, by contrast, are always local files selected from your Media Library, never a remote URL.
This service is provided by whoever operates the feed URL you enter; consult that provider's own terms and privacy policy.

**2. OpenStreetMap Nominatim (address geocoding, CSV/XLSX only)**
If a CSV or XLSX column meant to hold map coordinates contains free‑text instead (e.g. an address), this plugin's server sends that text to the Nominatim geocoding API (https://nominatim.openstreetmap.org) to resolve it into coordinates, and caches the result — using only the text already present in your own imported file. If that server‑side lookup did not already resolve an address, the visitor's own browser repeats the same Nominatim lookup when the map card is displayed, sending that address text (not otherwise identifying the visitor beyond what any HTTP request includes).
Nominatim Usage Policy: https://operations.osmfoundation.org/policies/nominatim/
OpenStreetMap Privacy Policy: https://osmfoundation.org/wiki/Privacy_Policy

**3. OpenStreetMap map tiles and fallback map (map cards only)**
Once a map card has resolved coordinates, the visitor's browser loads the map imagery directly from OpenStreetMap's tile servers (`*.tile.openstreetmap.org`) via the bundled Leaflet library. If tile loading fails, the card falls back to an embedded map from `umap.openstreetmap.fr` (OpenStreetMap France's uMap service) or, in some card layouts, from `www.openstreetmap.org/export/embed.html`. In every case only the coordinates/address already in your data are sent — no other visitor data.
OpenStreetMap Tile Usage Policy: https://operations.osmfoundation.org/policies/tiles/
OpenStreetMap Privacy Policy: https://osmfoundation.org/wiki/Privacy_Policy

**4. Leaflet and Pico CSS (bundled, not remote)**
Map cards and custom filter forms use the Leaflet mapping library and Pico CSS, both of which are bundled directly with this plugin (not loaded from a CDN) — no external request is made to load the library files themselves (see services 2 and 3 above for the map data they then display).

**5. YouTube, Vimeo, Dailymotion and SoundCloud**
If a WordPress post displayed in a grid already contains a video/audio embed you added yourself (via WordPress's native embed feature or Elementor), this plugin adjusts that existing embed so it keeps working when the card is shown on another site — the video/audio then continues to load directly from its original provider, exactly as it would on your own site (for an Elementor YouTube widget with its "Privacy Mode" option enabled, the player loads from `youtube-nocookie.com`, YouTube's privacy-enhanced domain, instead of `youtube.com`). Separately, if a card's data source is a YouTube channel's own RSS feed (see service 1 above), the visitor's browser loads a `youtube.com/embed/<video id>` player directly from YouTube for each video in that feed.
YouTube: https://www.youtube.com/t/terms — https://policies.google.com/privacy
Vimeo: https://vimeo.com/terms — https://vimeo.com/privacy
Dailymotion: https://www.dailymotion.com/legal/terms — https://www.dailymotion.com/legal/privacy
SoundCloud: https://soundcloud.com/terms-of-use — https://soundcloud.com/pages/privacy

**6. Gravatar (commenter avatars, WordPress source only)**
When a grid card displays WordPress comments, each commenter's avatar is loaded from Gravatar (`secure.gravatar.com`) using WordPress core's own `get_avatar()`, the same as anywhere else on a WordPress site — including on an external, non‑WordPress page the card is embedded on. This is governed by your site's own Discussion Settings, not a setting of this plugin.
Automattic Privacy Policy: https://automattic.com/privacy/
WordPress.com Terms of Service: https://wordpress.com/tos/

== Source Code ==

This plugin ships two built/minified JavaScript files: `js/swifflegrid.js` (the `<swiffle-grid>` web component, used on the front end and in the block/widget editors) and `build/swiffle/index.js` (the Gutenberg block's editor script).

The human-readable, non-minified source for both is included with this plugin under `published-source/` (see `published-source/README.txt` for the exact mapping and the build tools used to produce each file — Parcel for the Gutenberg block, Webpack + Babel for the web component). Nothing needs to be downloaded separately: install this plugin and the source is already there, ready to be read, studied, or forked.

This plugin also bundles two third-party libraries, each minified, under their own open-source license:

* **Leaflet** 1.9.4 (BSD-2-Clause) — `js/vendor/leaflet/leaflet.js`, `css/vendor/leaflet.css`. Unminified source: https://github.com/Leaflet/Leaflet
* **Pico CSS** 2.1.1 (MIT) — `css/vendor/pico.min.css`. Unminified source: https://github.com/picocss/pico

== Screenshots ==

1. Build in WordPress. Use Anywhere.
2. RSS news in a Tinder-style swipe
3. A page built using XLSX data
4. A navigation menu and content page, generated from your own data
5. One card, three superpowers: map, video, and photo gallery

== Changelog ==

= 1.3 =
* Minor internal improvements.

= 1.2 =
* WordPress compliance pass.

= 1.1.5 =
* Initial version.

== Upgrade Notice ==

= 1.3 =
Minor internal improvements.

= 1.2 =
Brings the plugin in line with current WordPress.org plugin directory guidelines.

= 1.1.5 =
Initial version.