=== Tawthiq ===
Contributors: tawthiq
Tags: pdpl, privacy, consent, privacy policy, cookie banner
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your site to Tawthiq, the PDPL privacy compliance platform for Saudi businesses: consent, policies, data requests and records.

== Description ==

Tawthiq is a privacy compliance platform built for Saudi Arabia's Personal Data Protection Law (PDPL), Arabic first. It helps businesses run the privacy work their website needs: visitor consent, privacy and cookie policies written for their site, data subject requests, and a dated record of all of it.

This plugin connects your WordPress site to your Tawthiq account:

* **Cookie banner.** Set it up in Tawthiq, in Arabic and English; the plugin puts it on every page.
* **Other plugins follow the visitor's choice.** Through the free WP Consent API, which WordPress asks you to install with this plugin, WooCommerce, Site Kit and other plugins that support it wait for consent.
* **Your numbers in wp-admin.** This month's visits against your plan, how many visitors accepted cookies, and where each feature stands, with a link to change it in Tawthiq.
* **Privacy and cookie policy pages.** When you publish a policy in Tawthiq, the plugin adds its page here and keeps it up to date. It never replaces your own privacy page without asking.
* **Data requests.** Put `[tawthiq_dsar_link]` on any page to link visitors to your data request form.
* **Tracking plugins on your consent page.** Tawthiq lists the active plugins that load trackers, and whether each waits for consent.

A free Tawthiq account covers one site.

No plugin can make a site compliant on its own. Tawthiq gives you the tools; how you collect and use personal data is still up to you.

== Installation ==

1. Install and activate the WP Consent API, then this plugin.
2. Open **Tawthiq** in the admin menu and click **Connect to Tawthiq**. Tawthiq opens in a new tab.
3. Sign in or create an account and approve. On a Multisite network, pick the site to connect.
4. Set the site up in Tawthiq: the scan, the banner and the policies.

== External services ==

This plugin connects to Tawthiq (https://tawthiq.tech), the service that runs the banner, the legal docs and data requests.

* When you connect, your browser opens `dashboard.tawthiq.tech` with your site's address and title (on a Multisite network, every site's address and title). The plugin then gets a key for your site from `dashboard.tawthiq.tech`.
* Every hour, when you open the plugin's page and when you come back to it, the plugin asks `dashboard.tawthiq.tech` for your banner settings, your published policies, your data request link and this month's visit and consent counts.
* When you connect and whenever plugins are turned on or off, the plugin sends the list of active plugins (folder name, name, and whether it supports the WP Consent API) to `dashboard.tawthiq.tech`.
* Every page of your site loads the banner script from `tawthiq.tech` and its settings from `consent.tawthiq.tech`. Nothing loads before you connect and turn the banner on in Tawthiq.
* When a visitor makes a choice in the banner, it is sent to `consent.tawthiq.tech` and kept as your consent evidence: the choice, a random visitor ID, the page's address, the language, the browser's user agent and the visitor's IP address with its last part zeroed.
* After a visitor agrees, the banner loads the third-party tools you set up in Tawthiq (for example Google Analytics or the Meta Pixel) from their own servers, under their own terms.

Terms: https://tawthiq.tech/terms
Privacy policy: https://tawthiq.tech/privacy

== Credits ==

The admin page uses the Alexandria font by The Alexandria Project Authors, under the SIL Open Font License 1.1 (`assets/fonts/OFL.txt`).

== Frequently Asked Questions ==

= Does it work without a Tawthiq account? =

No. The banner, its settings and the policies live in your Tawthiq account. A free account covers one site.

= Will it replace my privacy policy page? =

Only if you say so. If your site already has a published privacy page, the plugin asks before pointing WordPress to Tawthiq's.

== Screenshots ==

1. The Tawthiq page in wp-admin: this month's visits and consent, and where each feature stands.
2. Connect your site to Tawthiq from wp-admin.
3. Settings > Privacy asks before Tawthiq's policy replaces your own privacy page.

== Changelog ==

= 0.1.0 =
* First release: connect, banner, WP Consent API, policy pages, data request link, plugin report.
