=== Templ Companion ===
Requires at least: 6.1
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.3.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Connects your site to Templ: clears the server cache when content changes, improves the critical error page, and powers 1-click login.

== Description ==

Templ Companion is an optional plugin for WordPress sites hosted on [Templ](https://templ.io/).
It connects your site to the platform. Sites that have not switched may still use the older Templ Cache and Templ Token Login plugins.

With it active:

* The Templ server cache is cleared or refreshed whenever your content changes, so nobody is served a page you have already edited.
* Cart, checkout, account and other personal pages stay out of the cache, and you can add paths of your own.
* A crashed plugin or theme shows a readable page instead of the bare WordPress critical error screen, naming what broke and offering a way to switch it off.
* The **WP Admin** button in the Templ Panel signs you in with one click, without a password.

Deactivating the plugin does not break the site, but the cache stops clearing itself after an edit and the Panel's 1-click login stops working.

= Settings =

**Settings → Templ Companion**, or **Network Admin → Settings → Templ Companion** on a multisite, where the settings apply to every site in the network.
Each setting is explained on the screen itself.

= Documentation =

Guides, the hooks this plugin fires and the `wp-config.php` constants it reads are at [docs.templ.site](https://docs.templ.site/wordpress).

== Installation ==

Install Templ Companion if you want to use it on a Templ-hosted site. It requires WordPress 6.1 and PHP 8.0 or newer.
Download the current ZIP from [plugins.templ.io](https://plugins.templ.io/plugin/templ-companion-latest.zip), then upload and activate it under **Plugins → Add New Plugin → Upload Plugin**.
You can also run `wp plugin install https://plugins.templ.io/plugin/templ-companion-latest.zip --activate`.
Activating it deactivates the older Templ Cache and Templ Token Login plugins but leaves their files installed.
Active ZIP and WP-CLI installations can receive updates through the WordPress updates screen.

= Sites managed with Composer =

If your site is built with Composer, such as a Bedrock site, add the plugin to your `composer.json` instead.
A deploy replaces the plugin directory, so a copy installed through WordPress is gone by your next release.

First make sure your project allows the `composer/installers` plugin, which is what puts a WordPress plugin in your plugins directory rather than in `vendor`.
Bedrock allows it already; anything else needs this in `composer.json`:

    "config": { "allow-plugins": { "composer/installers": true } }

Then add the repository and the plugin:

    composer config repositories.templ composer https://plugins.templ.io
    composer require templ/templ-companion

Composer now decides which version the site runs, so it is updated with `composer update templ/templ-companion`.
WordPress may still offer the update on its own updates screen; installing it there works, but your next deploy puts back whatever your `composer.json` asks for.

== Support ==

Start a chat in the [Templ Panel](https://panel.templ.io/), or email support@templ.io.

Release notes for every version are behind the **View details** link next to the plugin on the Plugins screen.
