=== NEWTIV Handover ===
Contributors: newtiv
Tags: continuity, succession, inactivity, emergency access, domain expiry
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keeps your site alive if you disappear: trusted people, a veto period, an emergency account, an encrypted handover file and optional outside watch.

== Description ==

Many websites die for human reasons: the freelancer leaves with the passwords, the founder falls ill or travels for months, the card that paid for the domain expires and nobody reads the warnings. Backups protect the files; nothing protects the handover.

NEWTIV Handover lets you choose up to three trusted people (a partner, an accountant, a relative, your agency) who can take over if you no longer look after the site, with safeguards at every step:

1. **Trusted people accept their role.** Each one receives an invitation by email and must accept it.
2. **Signs of life are recorded.** Every administrator visit counts. You do not need to do anything.
3. **Reminders first.** 14, 7 and 1 day(s) before the inactivity delay (30, 60, 90 or 180 days) ends, you receive an « I'm still here » link on every address you gave, including a personal one.
4. **Trusted people are contacted** only when the delay is over. To request access, they confirm their address with a 6-digit code.
5. **You can refuse.** You are warned on all your addresses and in the dashboard, and have 3, 7 or 14 days to refuse with one click. Signing in also cancels the request.
6. **A separate account is created.** Without a refusal, the trusted person gets their own account (administrator or editor) and a link to choose its password. Your password is never shared.

Every step is written to a log, and the owner is told about each one.

**Encrypted handover file**

Write down what a successor needs: registrar, host, email and DNS, paid services and their renewal dates, where the passwords are kept, useful contacts, your wishes. The file is encrypted in your browser (PBKDF2-SHA256 with 600,000 iterations, AES-256-GCM) with a passphrase you give your trusted people in advance. The passphrase and the clear text never reach the server; only the encrypted file is stored. Any administrator, including the emergency account, can open it with the passphrase, and you can download the encrypted file to keep a copy offline.

**Outside watch (optional)**

A plugin cannot raise the alarm when its own site is dead. If you turn on outside watch, the site sends ZAIA a signed sign of life every day. If they stop, ZAIA first calls the site to wake up its scheduled tasks, then emails you after 3 days and your trusted people after 7 days, with a page where, after an email code, they can open the encrypted handover file with the passphrase. Web agencies can link the sites they look after to their ZAIA account and follow them on one screen.

**Domain and certificate alerts**

The plugin also watches what silently kills sites: it reads the expiry date of your domain name (public registration data, RDAP) and of your HTTPS certificate, and emails you 30, 14, 7 and 1 day(s) before they expire. Trusted people can receive these warnings too.

**Privacy**

Trusted people must accept before they are counted. Their data is included in the WordPress export and erasure tools, and a text is suggested for your privacy policy.

== External services ==

To read the expiry date of the site's domain name, this plugin queries rdap.org (https://rdap.org), a public service that forwards the request to the official registration data service (RDAP) of the domain's registry. Only the domain name is sent, once a day and when you click « Run the checks now ». No personal data is sent.

rdap.org is an independent service maintained by Gavin Brown. According to its privacy considerations (https://about.rdap.org/), it keeps aggregated statistics (network, user agent, result code, extension) and does not log individual queries; it runs behind Cloudflare. The registry that finally answers depends on the domain extension. Some country extensions publish no expiry date; the plugin then says so instead of guessing.

The HTTPS certificate is read directly from your own site's server. Emails are sent through your WordPress site (wp_mail).

**ZAIA (only if you turn on outside watch, off by default).** ZAIA (https://zaia.newtiv.com) is operated by NEWTIV. When you turn it on, and then once a day and after each change, the plugin sends: the address, name and language of the site; the owner's email addresses; the names and email addresses of the trusted people who accepted; the status of the process (phase, dates, counts, plugin and WordPress versions); the domain and certificate expiry dates; and the handover file exactly as it is stored on the site, encrypted (ZAIA cannot read it). Requests are signed with a secret known only to the site and ZAIA. Email addresses are encrypted at rest. Turning outside watch off, or deleting the plugin, asks ZAIA to erase all the data of the site. If the agency code of a web agency is entered, that agency sees the status of the site in its ZAIA account, never the addresses nor the file.

ZAIA terms: https://zaia.newtiv.com/conditions · privacy policy: https://zaia.newtiv.com/confidentialite

== Installation ==

1. Install and activate the plugin.
2. Open Tools → Site Handover.
3. Send a test email to yourself and add a personal address in « Other addresses of the owner ».
4. Add one to three trusted people. They must accept the invitation.

== Frequently Asked Questions ==

= Does a trusted person get my password? =

No. A separate account is created for them, only after the inactivity delay, the reminders, their code confirmation and the veto period. You can delete that account at any time in Users.

= What if I am just on holiday? =

Any visit to the administration resets the count. If you will be away longer than the delay, choose a longer delay or click the « I'm still here » link in the reminder.

= What if my site cannot send emails? =

Then reminders and alerts cannot be delivered. Use « Send a test email to the owner »; if it does not arrive, install an SMTP plugin.

= Does it work if the site is completely down? =

Only with outside watch: the checks of the plugin run on the site itself (WP-Cron), so a dead site cannot send anything. With outside watch on, ZAIA notices that the signs of life stopped and warns you, then your trusted people.

= Can ZAIA or NEWTIV read my handover file? =

No. It is encrypted in your browser before it leaves your computer, with a passphrase that is never sent anywhere. Without the passphrase, the copy kept by ZAIA cannot be read, by anyone.

= What if I forget the passphrase? =

Nobody can recover it. Write a new file with a new passphrase, and give the new passphrase to your trusted people.

== Changelog ==

= 1.1.0 =
* Encrypted handover file, written and read in the browser; encrypted copy downloadable.
* Optional outside watch by ZAIA: daily signed sign of life, warnings when the site goes quiet, relay page for trusted people, agency view.
* The screen is split into three tabs: Overview, Handover file, Outside watch.

= 1.0.0 =
* First release: trusted people, inactivity reminders, access request with code, veto period, emergency account, log, domain and certificate alerts, privacy tools.
