=== TINXDK Search Pro ===
Contributors: tinxdk
Tags: search, live search, woocommerce search, filters, search statistics
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.2.35
Requires Plugins: tinxdk-search
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Pro add-on for TINXDK Search Lite: unlimited search fields, filters, layouts, relevance, synonyms, statistics and more.

== Description ==

TINXDK Search Pro is an add-on for the free plugin **TINXDK Search Lite** (WordPress.org). It needs the free plugin and a licence key from tinxdkcloud.dk. Without a valid licence the free plugin keeps working exactly as before (one search field) and the Pro features stay off; everything you saved is kept.

**What the licence unlocks**

* **Unlimited search fields (instances)** with their own sources, criteria, filters and layout. Create, duplicate, rename and delete under TINXDK Søg > Søgeinstanser; copy the shortcode `[tinxdk_search id="…"]`, use the shortcode generator or pick the instance in the block's sidebar.
* **Filter box** (facets): categories and taxonomies (checkbox, dropdown, multi-select), content type, price slider, date range and custom field filters (ACF keys and product fields from OpenDIMS PIM stored as meta). Reset and search buttons. A request can only use filters you defined.
* **Layouts**: vertical, horizontal, grid (isotopic), polaroid, compact magnifier box that unfolds, grouping by source, one flat list or by category.
* **Advanced relevance**: weights per field, Priorities (promote or demote chosen posts, authors or categories), search in custom fields (all or selected), permalink, ID and terms, authors and media files as extra sources, include/exclude by term, author and date.
* **Synonyms, stop words and simple typo tolerance** with CSV import and export.
* **Statistics**: local log of searches (top searches, searches without results) that stores only the phrase and counters per day: no IP address, no user ID, no cookie. Can be switched off, has a retention period and a clear button. Google Analytics / Tag Manager events (dataLayer/gtag). Cache of results in transients.
* **Advanced autocomplete**: "Try these" keywords, popular searches and predictive input.
* **Result templates** with variables such as {title}, {price}, {sku}, {meta:key}. Only whitelisted variables are replaced, the output is plain text.
* Automatic plugin updates from the TINXDK licence server.

Pro plugs into the free plugin through its hooks (`tinxdk_search_max_instances`, `tinxdk_search_settings_defaults`, `tinxdk_search_sanitize_settings`, `tinxdk_search_admin_sections`, `tinxdk_search_sources`, `tinxdk_search_query_args`, `tinxdk_search_rows`, `tinxdk_search_results`, `tinxdk_search_result_item`, `tinxdk_search_render_args`, `tinxdk_search_loaded`). The free plugin and its settings are never changed by Pro; deactivating Pro keeps the free plugin working and keeps the Pro settings you saved.

**Licence**

Activate under TINXDK Søg > Licens: enter the key (TINX-XXXX-XXXX-XXXX-XXXX) and click Activate. The licence key, the site URL and the plugin, WordPress and PHP versions are sent to the licence server (licens.tinxdkcloud.dk) when activating and deactivating, twice daily when validating and when checking for updates. Nothing else is sent. Without contact to the licence server the licence keeps working for 7 days.

Uninstalling the add-on frees the site slot at the licence server (best effort) and removes the licence data, the Pro settings, the lexicon, the statistics and the cache. The free plugin's settings and instances stay.

**Privacy**

The statistics store the search phrase and counters per day only. Phrases that could be personal data (e-mail address, long numbers, links) are never shown as popular searches. With Google Analytics / Tag Manager events switched on, the search phrase is sent to your own dataLayer; make sure your consent solution covers it.

== Installation ==

1. Install and activate the free plugin **TINXDK Search Lite** (Plugins > Add New).
2. Upload the Pro zip from tinxdkcloud.dk (Plugins > Add New > Upload Plugin) and activate it. If the free plugin is missing or too old, Pro stays inactive and shows a notice.
3. Open TINXDK Søg > Licens and enter your licence key.

== Frequently Asked Questions ==

= Does the free plugin still work without Pro or without a licence? =

Yes. One search field with all its settings works as before. Extra instances and Pro settings you saved are kept and start working again with a licence.

= Which version of the free plugin do I need? =

1.0.0 or newer. Otherwise Pro shows a notice and does nothing.

= Is the statistics log GDPR friendly? =

It stores no IP address, user ID or cookie, only the phrase and counters per day. You can switch it off, set the retention period and clear it.

= What is not included? =

AI features, an index table engine and multisite network settings are not part of this version.

== Changelog ==

= 1.0.0 =
* First release: unlimited instances with shortcode generator and block picker, filter box, layouts, advanced relevance and sources, synonyms/stop words/typo tolerance with CSV, statistics with GA/GTM events and cache, advanced autocomplete, result templates.

== Upgrade Notice ==

= 1.0.0 =
First release.
