=== 404ops Data Tables ===
Contributors: spwhite
Tags: table, csv, excel, spreadsheet, block
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 3.30.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import CSV, Excel or native JSON into sortable WordPress tables.

== Description ==

404ops Data Tables turns files and connected sources into searchable, sortable tables
that you can edit in WordPress and publish with the Data Table block or
`[data_table id="123"]` shortcode.

Free includes:

* CSV, `.xlsx`, XLS, ODS, XML, JSON and registered PHP-array imports.
* Public CSV and HTTPS JSON sources, WordPress content, WooCommerce
  products/orders/customers and form entries.
* Import a private Google Spreadsheet through a read-only service account, including formulas as their computed, displayed values.
* Manual refresh, a spreadsheet-style editor, column types and formats, fixed
  headers/columns, merged cells, hidden rows/columns, saved views, filters,
  fuzzy search, grouping, front-end editing and rich row details.
* CSV, JSON, Excel and Word exports, plus migration from TablePress, Ninja
  Tables, Visualizer and wpDataTables.
* Authenticated REST automation and optional AI-assisted import, transforms,
  questions and highlighting with a provider key controlled by the site owner.

Every free feature requires no licence key. Installing the separate add-on
never removes a free feature, and the free plugin still works if Pro is absent
or a maintenance entitlement ends.

A normal embedded table places every row in the page, so page weight is the
practical limit. Use the explicitly published, paged Pro query mode for very
large data sets. Imports and connected sources also have bounded format and
request limits; failures retain the last published rows.

404ops Data Tables sends no analytics or table data to 404ops. Optional local Reports
are off until an administrator enables them and store aggregate counters only
in the site's database.

== Free vs Pro ==

404ops Data Tables Pro is a separate add-on and separate download. It adds scheduled
source refresh, explicitly published paged queries and live external-database
tables, formulas, chart authoring and public chart embeds, conditional
highlight rules, expandable row detail, and Pro export options including PDF.
The free plugin contains no paid implementation.

A linked source can always be refreshed manually in Free. Refreshing on a schedule, without you being there, is what the Pro add-on adds.
A schedule can run every hour or once a day, but WordPress runs scheduled jobs when someone visits your site, so a quiet site can run late.

If valid Pro access is unavailable, scheduled work and Pro-only public views
stop safely while saved configuration and ordinary free tables remain. Current
product and licence details are at
[404ops Data Tables](https://404ops.com/plugins/404ops-data-tables).

== Installation ==

1. Upload the release ZIP through Plugins -> Add New, or install it from the
   WordPress Plugin Directory after approval.
2. Activate 404ops Data Tables.
3. Open 404ops -> Data Tables -> Add New.
4. Import a file, connect a source or start from a template, then publish the
   table with its block or shortcode.

The plugin requires WordPress 7.0+, PHP 8.0, and the PHP JSON, mbstring, XML and
ZIP extensions.

== External services ==

Ordinary rendering, local editing and local export make no request to 404ops.
The optional paths below run only after an administrator configures or invokes
them.

**Remote CSV and JSON.** A public `http://` or `https://` link is fetched when
an administrator imports, previews or refreshes it; Pro can repeat that fetch
on the chosen schedule. The request includes WordPress's normal User-Agent,
which contains the site's home URL. The destination receives no visitor
identifier or table data. JSON sources must be public HTTPS and may follow
same-host pagination. The source operator's terms and privacy policy apply. A
published Google Sheet must use File -> Share -> Publish to web -> CSV.

**Private Google Sheets.** A service-account token is sent to
`oauth2.googleapis.com`; the chosen spreadsheet ID and range are sent to
the Google Sheets API at `sheets.googleapis.com`. Access is read-only. The
authentication token and requested spreadsheet address are sent to Google;
table data and visitor data are never sent. The stored key is encrypted and
never rendered back. Fetches are capped at 10 MB, 50,000 rows and 100 columns.
[Google Terms](https://policies.google.com/terms) and [Google Privacy
Policy](https://policies.google.com/privacy) apply.

**External databases.** MySQL or PostgreSQL connections send the credentials
and read-only query selected by the administrator to that administrator's
database host. Snapshot imports copy the result into WordPress; Pro live tables
read the approved result at view time. The database operator's terms and
privacy policy apply.

**AI providers.** AI features are optional and require an administrator to
connect OpenAI, Anthropic, Google Gemini, OpenRouter, Ollama or another
OpenAI-compatible endpoint. An invoked feature sends its instruction and the
minimum selected table context needed for that action. Hidden rows/columns are
not sent, and Ask/Highlight refuse personal-data sources. Provider terms and
privacy policies apply: [OpenAI terms](https://openai.com/policies/terms-of-use)
and [privacy](https://openai.com/policies/privacy-policy), [Anthropic terms](https://www.anthropic.com/legal/commercial-terms)
and [privacy](https://www.anthropic.com/legal/privacy), [Gemini terms](https://ai.google.dev/gemini-api/terms)
and [Google privacy](https://policies.google.com/privacy), [OpenRouter terms](https://openrouter.ai/terms)
and [privacy](https://openrouter.ai/privacy). The operator of a custom endpoint
sets its policy. If an administrator turns on "Ask this table" for visitors,
a visitor's short question and the visible table context are sent to the
connected provider (rate limited, off by default).

**Webhooks.** Outbound webhooks are off until an administrator adds an endpoint.
When a table changes, a signed JSON message (table id, change type and counts;
visible row values only if the administrator ticks that option) is sent to that
endpoint. Private and loopback addresses are refused. The endpoint operator's
terms and privacy policy apply.

**Pro licensing.** The separate Pro add-on contacts the 404ops licence service
when a key is activated or revalidated and when WordPress checks for an eligible
Pro update. It sends the licence key, entitlement, site fingerprint and product
version. The 404ops terms and privacy policy apply to that service.

A table containing a remote image causes each visitor's browser to request that
image from its host. A link contacts its destination only when the visitor
opens it.

== Frequently Asked Questions ==

= Is 404ops Data Tables free? =

Yes. Import, editing, blocks, shortcodes, filters, search, manual refresh and
the other features listed under Description need no licence. Pro is optional.

= How do Google Sheets work? =

For public data, Publish to web as CSV and use the CSV URL. For private data,
create a read-only Google service account, store its JSON key in 404ops Data Tables and
share only the intended spreadsheet with that account. 404ops Data Tables exchanges an
authentication token and reads the chosen range through the Google Sheets API.

= How much data can I publish? =

There is no licence quota, but ordinary tables render every row in one page and
page weight grows with the data. A few thousand rows is usually comfortable;
test your theme and hosting. Pro's explicitly published query mode pages and
filters large approved data sets on the server.

= What happens on uninstall? =

On a single site, the Free plugin keeps tables and settings by default. It
deletes them on uninstall if an administrator enabled the remove-data preference.

On multisite, standard uninstall of these Free and Pro versions requires approval
from a removal handler configured by your host. Ask your hosting provider or
installation administrator to coordinate removal. They must check all sites and
networks for active use, prevent concurrent activation and file changes through
the end of removal, and apply each site's cleanup choice only to its own data.
Review ownership of shared uploads and legacy user metadata before deleting them.
Retained data may include personal data, private uploads, credentials and licence
keys, which may be stored in plaintext.

Older or mixed versions can behave differently. Tools that skip uninstall and
direct filesystem deletion can still remove shared files that another site uses.

= Where can I get help? =

Visit https://supportminer.404ops.com to open a support request. Use the WordPress.org support forum for the free plugin after approval. Product
and Pro support information is at
[404ops Data Tables](https://404ops.com/plugins/404ops-data-tables), or email
support@404ops.com. Include WordPress/PHP versions and steps to reproduce; never
send passwords, licence keys, service-account JSON or database credentials.

== Credits ==

404ops Data Tables bundles 404ops UI Kit and AI Client under GPL-2.0-or-later. Bundled
Space Grotesk and JetBrains Mono fonts use the SIL Open Font License 1.1; their
licences ship with the files. 404ops Data Tables Pro is a separate GPLv3-or-later add-on
and includes Apache ECharts under Apache-2.0 and Noto font subsets under OFL-1.1,
with licence and notice files in its own download.

== Screenshots ==

1. Every table you have built, with its source, row count and shortcode.
2. Edit table rows directly in WordPress, with column, display and source controls in nearby tabs.
3. Import a CSV or XLSX file, or link a CSV source. Manual refresh of a linked CSV with Sync now is free; hourly or daily automatic refresh requires the separate 404ops Data Tables Pro add-on.

== Changelog ==

= 3.30.7 =
* Changed: multisite uninstall requires approval from a removal handler configured by your host. See What happens on uninstall?

= 3.30.6 =
* Harden AI connection form nonce handling through the shared client patch.

= 3.30.5 =
* Added: guarded read-only administrative status interfaces.
* Added: five bundled draft language catalogs with checked WordPress loading.
* Improved: development test-session and catalog packaging checks.

Older releases are listed in `changelog.txt`, which ships with the plugin.

= 3.30.4 =
* Fixed: the front-end editing, saved-views, Ask, paging and child-row routes now check access in the route's own permission callback as well as inside the handler.
* Fixed: one email address can be sent at most three editing links an hour, whoever asks.
* Changed: the admin sub-screen page slugs are now `ops404-data-tables-*`; bookmarks to the old URLs stop working.

= 3.30.3 =
* Updated the licence client (0.3.5): Pro keeps working after a licence expires.

= 3.30.2 =
* Fixed: removed dead links from the External services section.

= 3.30.1 =
* Corrected the plugin name in the bundled changelog heading.

= 3.30.0 =
* Changed: the plugin is now 404ops Data Tables. Its folder, slug and text domain are `404ops-data-tables` (Pro: `404ops-data-tables-pro`). The `[data_table]` shortcode and the Data Table block are unchanged.

= 3.29.0 =
* Added: refresh rules. Name a key column and your local cell edits survive every refresh of a linked source (conflicts are listed, never overwritten), and apply simple clean-up steps such as trim, case, find and replace, number and date normalisation, split and join on each refresh.
* Added: multi-level column group headers (up to three header rows) and merged header cells; admins can merge and unmerge cells in the Data tab. Merged cells and hidden rows now survive a refresh.
* Added: repeating form fields import as a linked child table.
* Added: AI agent tools to delete or hide rows and change columns, reads past 5,000 rows, "Ask this table" for visitors (off by default, rate limited), Ask over large tables, and editing highlight rules by description.
* Added: signed outbound webhooks (off by default) that notify an address you choose when a table changes. See External services.
* Added (Pro): charts can be created from an Ask answer and by AI agents.
* Added (Pro): PDF and Word reports gain Legal, A3, A5 and Tabloid paper, margins, column alignment and widths, a logo, group headings with subtotals, a Word page footer, tagged PDF and a PDF/A profile, and Word template files.

= 3.28.0 =
* Added: choose the rows-per-page sizes visitors see, remember their choice, and map the page-length menu of TablePress and wpDataTables imports. The grid editor now also works on one page of a server-paged table.
* Added: saved AI cleaning recipes can be edited, marked for review only when a sync really changed the table, and run in explicit 100-row batches.
* Added: detail templates gain variants chosen by a column value, show-when sections, label placeholders, child counts and sums, a visual builder and a print stylesheet.
* Added: edit saved table templates in place, start from a template on every Add New form, apply one over the REST API, and carry the rows-per-page menu, fixed layout, date order, filter presets and saved views. Signed-in visitors can keep private saved views.
* Added: page-level sticky header, right-edge pinned columns and a pinned footer.
* Added: query builder aggregates, GROUP BY, HAVING and bounded subqueries; right, full, one-to-many, many-to-many, multi-column and nested joins; live site queries and virtual joins (these two are served by the Pro add-on).
* Added: WooCommerce customers gain first and last order dates and an opt-in merge of guest orders by billing email. Ninja Tables DataTables-engine tables and #colspan# cells import.
* Added (Pro): charts over calculated columns, JPEG and PDF chart downloads, and charts that follow the table's live filters.

= 3.27.1 =
* Fixed: a missing closing brace in the stylesheet left the details dialog, detail page, detail-template layouts, print view and merged-cell styles unstyled. They are styled again.

== Upgrade Notice ==

= 3.30.5 =
Includes checked draft translations and administrative status reporting. Human linguistic review is separate.

= 3.30.1 =
Corrects the plugin name in the bundled changelog. No other change.

= 3.30.0 =
Renamed to 404ops Data Tables (folder and slug `404ops-data-tables`). The shortcode and block are unchanged.

= 3.29.0 =
Adds refresh rules, multi-level headers, form repeaters, AI agent tools, visitor Ask and webhooks. Pro adds richer PDF and Word reports.

= 3.28.0 =
Adds detail-template variants and a builder, template editing, private saved views, page-level sticky headers, query builder aggregates and joins, and rows-per-page sizes. Pro adds calculated-column charts and JPEG/PDF chart downloads.

= 3.27.1 =
Fixes a stylesheet error that left the details dialog, detail page, print view and merged-cell styles unstyled in 3.27.0.

= 3.27.0 =
Adds table folders, a rows-per-page menu, star ratings, .ods/.xls merged cells and saved AI cleaning recipes. Fixes .ods imports that dropped grouped rows. Pro adds chart image downloads and Letter/"Page n of N" PDFs.

= 3.26.4 =
Adds native privacy-policy guidance and a clearer WordPress.org listing. Free and Pro runtime behavior is otherwise unchanged.
