=== Content Gate ===
Contributors: leftandright
Tags: restrict content, membership, user roles, access control, private content
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Decide who sees what. Restrict pages, posts, blocks and widgets by login status, user role or device, and choose what everyone else gets instead.

== Description ==

Content Gate answers one question for every piece of your site: who can see this,
and what does everyone else get instead?

A rule has four parts, and the admin screen walks you through them one at a time:
who keeps access, what the rule covers, what a blocked visitor receives, and how
far the rule reaches outside the page itself. Every option says in plain words
what it does and what it changes, because a plugin that closes content to your
visitors is one you should understand before you press save, not after.

The plugin installs empty. It decides nothing until you write the first rule.

* Restrict by login status, by user role, or by device
* Target whole content types, single items, or terms in any taxonomy
* Choose the outcome: a message in place of the content, a redirect, or another page
* Keep restricted content out of archives, site search and the REST API
* Per-block visibility in the editor, and per-widget visibility
* A shortcode for restricting part of a public page
* Administrators always keep access, so a wrong rule cannot lock you out

The whole interface is in English and follows the language of the site: an
Italian translation ships with the plugin, and any other language can be added
with the usual translation files.

= What it does not do =

Restricting a page hides the page. A file in the media library keeps its own
direct address, and no plugin can close that from inside WordPress: that is a job
for the web server. The plugin says so in the settings rather than letting you
assume otherwise. If those files have to be private, they belong behind a portal
that streams them.

== Installation ==

1. Upload the zip from Plugins > Add new > Upload plugin, then activate.
2. Go to Content Gate > Rules and write the first rule.
3. Nothing else. There is no setup step and no service to connect.

== Frequently Asked Questions ==

= Can a wrong rule lock me out of my own site? =

No. Administrators keep seeing everything, and that stays on unless you turn it
off yourself in Settings, which is worth doing for a minute when you want to
check what a visitor really sees.

= What happens when two rules cover the same page? =

The first rule from the top decides, whichever way it decides. Put the specific
rules above the general ones, and use the arrows in the list to move them.

= Does it work with a page cache? =

Rules by login status and role work: a cache serves logged out visitors and
leaves logged in ones alone. Rules by device are the exception, because a cache
can serve the wrong version, and the plugin says so next to the option. For
layout choices there is per-block hiding, which works in CSS and survives
caching.

= What does the free version leave out? =

It applies the first 2 rules, with conditions by login status. Roles, devices,
per-block and per-widget visibility, hiding from archives, search and the REST
API, replacement pages and targeting by term are part of Pro. Nothing is lost:
whatever you configure stays saved and starts working as soon as a licence is
active.

== Changelog ==

= 1.0.2 =
* Updates now arrive on their own. The plugin asks the left&right server
  whether a newer version exists, and if there is one it appears in the
  Updates screen of your WordPress like any other plugin, with its notes and
  the usual Update button. The automatic-update switch on the plugin row works
  too.
* If our server is unreachable nothing happens at all: no warning, no error,
  the Updates screen stays as it was. A fault on our side must not disturb
  your dashboard.
* The package is only accepted when it comes from the same server as the
  licence service. A tampered answer cannot make your site install something
  from somewhere else.

= 1.0.1 =
* The licence service moved to digital.nopvideo.com. This plugin was still
  calling the old address, so activating a key answered with WordPress's own
  "No route was found matching the URL and request method" - a message that
  tells a paying customer nothing at all.
* A reply is no longer trusted just because it is JSON. A WordPress without
  the licence service installed answers in JSON too, and that answer was being
  read as if it were a licence. The plugin now checks the HTTP status and the
  shape of the reply, and says which address it knocked on when nobody
  answered.
* The Pricing link in the admin points at the current pricing page.

= 1.0.0 =
* First release
