=== Password Protected Categories ===
Contributors: barn2media
Tags: woocommerce, category, password, protection
Requires at least: 6.1
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 2.1.28
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Password protect your blog categories and custom taxonomies. Unlock them with a simple password.

== Description ==

The only WordPress plugin to password protect entire categories of blog posts, products, events, portfolios, or other types of website content.

== Installation ==

1. Go to Plugins -> Add New -> Upload and select the plugin ZIP file (see link in Purchase Confirmation Email).
1. Activate the plugin.
1. Enter your license key under Settings -> Protected Categories.
1. Create or edit any category or custom taxonomy, e.g. under the Posts -> Categories menu.
1. Set the 'Visibility' to Password Protected and enter one or more passwords.
1. The category (and all of its posts) will now be password protected.

== Frequently Asked Questions ==

Please refer to [our support page](http://barn2.co.uk/our-wordpress-plugins/password-protected-categories-documentation-support/).

== Changelog ==

= 2.1.28 =
Release date 24 March 2026

 * Fix: Security hardening
 * Fix: Protected posts are hidden from the backend in a specific case
 * Dev: Updated contributors list
 * Dev: Tested up to WordPress 6.9.4 and WooCommerce 10.5.3

= 2.1.27 =
Release date 23 December 2025

 * Dev: Added compatibility with Document Library Pro - Essentials.
 * Dev: Added filter to control which taxonomies can be protected.
 * Dev: Improved setup wizard style and behavior.
 * Dev: Tested up to WordPress 6.9.0

= 2.1.26 =
Release date 11 September 2025

 * Dev: Updated internal libraries and tested up to WordPress 6.8.2

<!--more-->

= 2.1.25 =
Release date 3 July 2025

 * Fix: Document Library Pro - button not showing for protected category when behavior set to open single document
 * Dev: Tested up to WordPress 6.8.1

= 2.1.24 =
Release date 11 December 2024

 * Fix: Document Library Pro - category filter was not displaying protected categories when option enabled
 * Fix: Document Library Pro - front end submission form protected category display issue
 * Dev: Tested up to WordPress 6.7.1

= 2.1.23 =
Release date 9 October 2024.

 * Fix: Document Library Pro - Unlocked protected categories were not displayed in 'Folder' layout and 'Table' layout's category column

= 2.1.22 =
Release date 12 September 2024.

 * Fix: Document Library Pro - Hidden categories were displayed in 'Folder' layout and 'Table' layout's category column
 * Fix: Skipping wizard was not saving options data on fresh installs

= 2.1.21 =
Release date 26 August 2024.

 * Fix: Document Library Pro - Download button not displaying for multiple locked categories even when one category is unlocked and document is accessible.
 * Dev: Tested up to WordPress 6.6.1

= 2.1.20 =
Release date 21 May 2024.

 * Fix: Document Library Pro - Download button not inheriting protection from parent category when the child category is public.

= 2.1.19 =
Release date 08 April 2024.

 * Tweak: Document Library Pro - show or hide the multi-select checkboxes depending on document protection.
 * Fix: Document Library Pro - preview and download button visible when document is assigned to multiple categories where at least one is public.
 * Fix: Document Library Pro - no buttons visible on documents when no categories assigned.
 * Fix: PHP 8.2 Deprecation notice.
 * Dev: Tested up to WP 6.5

= 2.1.18 =
Release date 11 January 2024.

 * Fix: Taxonomy menu items stayed hidden when multiple protection levels applied to an unlocked term.
 * Fix: Posts menu items stayed hidden when multiple protection levels applied to an unlocked term.
 * Fix: Avoid conflict with Ultimate Member's Access restriction feature.
 * Fix: Unable to use HTML within the "Login message" setting when using the setup wizard.
 * Tweak: Other minor improvements.
 * Dev: Updated internal libraries.
 * Dev: Tested up to WP 6.4.2

= 2.1.17 =
Release date 09 August 2023.

 * Dev: Updated internal libraries.
 * Dev: Tested up to WP 6.3.

= 2.1.16 =
Release date 31 May 2023.

 * Fix: FILTER_SANITIZE_STRING is deprecated as of PHP 8.1
 * Dev: Updated internal libraries.

= 2.1.15 =
Release date 01 May 2023.

 * Fix: protected posts showing on archive pages while the post is still locked.
 * Fix: protected posts showing on the search results page while the post is still locked.

= 2.1.14 =
Release date 18 April 2023.

 * Fix: Menu items displaying while still locked.

= 2.1.13 =
Release date 10 April 2023.

 * Fix: Protected categories showing up in filters of the "Document Library Pro" plugin.

= 2.1.12 =
Release date 28 March 2023.

 * Fix: Buttons of documents in public categories of the "Document Library Pro" plugin, don't display regardless of being logged in or out.

= 2.1.11 =
Release date 15 March 2023.

 * Tweak: hide download and preview buttons in the "Document Library Pro" plugin when the post is locked.

= 2.1.10 =
Release date 31 October 2022.

 * Fix: protected sub categories are showing in the categories filter when using the Posts Table Pro plugin.
 * Dev: Updated Barn2 libraries.

= 2.1.9 =
Release date 23 August 2022.

 * Fix: compatibility issue between the "Pods" and "The Events Calendar" plugin.

= 2.1.8 =
Release date 21 April 2022.

 * Fix: protected & unlocked categories not being displayed in default WP category widget.

= 2.1.7 =
Release date 13 April 2022.

 * Fix: child categories with inherited protection not visible within the Posts Table Pro filter.

= 2.1.6 =
Release date 11 April 2022.

 * Tweak: added autofocus support to the password form.
 * Fix: child categories with inherited protection not visible within the Document Library Pro filter.
 * Fix: broken select2 styling when the Avada theme & Yoast SEO are active.

= 2.1.5 =
Release date 04 April 2022.

 * Fix: fixed an issue that prevented unchecking of the "password protected" option.
 * Tweak: improved PHP8 compatibility.
 * Tweak: improved WPML compatibility.

= 2.1.4 =
Release date 10 February 2022.

 * Fix: fixed an issue that prevented passwords from being displayed when changing/switching protection type.

= 2.1.3 =
Release date 08 February 2022.

 * Deprecated: "Private categories" option. Private categories will continue to work, but it's recommend to switch to the more user-friendly "Role" option.
 * Tweak: Added a deprecation notice inside the category editing page.
 * Tweak: adjusted the order of certain options inside the setup wizard.
 * Tweak: adjusted the order of sections inside the plugin's settings page.
 * Tweak: updated language files.

= 2.1.2 =
Release date 15 November 2021.

 * Tweak: search users via ajax when protecting terms by "users".
 * Fix: undefined index errors within the setup wizard when selected pages no longer exist.
 * Fix: terms not selectable within gutenberg when using specific protection rules.
 * Fix: some unlocked content would not display as unlocked when publicly queried.

= 2.1.1 =
Release date 03 November 2021

 * Fix: setup wizard unable to start when the license is not activated.
 * Fix: compatibility issues with deprecated PHP versions.

= 2.1.0 =
Release date 06 October 2021

 * New: Added central login page support.
 * New: Added setup wizard.
 * Tweak: Updated language file.
 * Fix: Child categories not inheriting protection rules when multiple taxonomies are assigned to a post.

= 2.0.0 =
Release date 07 September 2021

 * New: Added user & role protection to protected categories.
 * Tweak: Updated language file.
 * Dev: Updated Barn2 library.

= 1.4.4 =
Release date 20 July 2021

 * Tested up to WordPress 5.8.
 * Dev: Updated Barn2 library; minor bug fixes.

= 1.4.3 =
Release date 9 June 2020

 * Fix: Error in license system which resulted in license key being deactivated on some sites.
 * Dev: Added Composer support.
 * Dev: Updated Barn2 library; minor bug fixes.

= 1.4.2 =
Release date 26 February 2020

 * New: Added CSS classes to the <body> tag for private and protected categories.
 * Fix: Bug which prevented event categories being protected in The Events Calendar plugin.
 * Dev: Added additional hooks when a private or password protected category is displayed.

= 1.4.1 =
Release date 11 February 2020

 * Fix: Fixed a bug introduced in previous update which meant protected posts were always displayed in archives, the main blog
page, widget areas and navigation menus when the 'Show password protected categories and posts to visitors' option was unticked.
 * Fix: Improve compatibility with WooCommerce Protected Categories plugin.

= 1.4 =
Release date 8 February 2020

 * New: Updated plugin architecture and added new license system.
 * Tweak: Minor HTML and styling changes to password login form.
 * Tweak: Added 'no cache' constants to prevent caching of protected posts/categories using certain caching plugins.

= 1.3.4 =
Release date 31 October 2019

 * Tested up to WordPress 5.3.
 * Updated library code.
 * Fix compatibility issue with WooCommerce Protected Categories plugin.

= 1.3.3 =
Release date 10 January 2019

 * Fix: Edge-case bug introduced in 1.3 update when using the category_login shortcode.
 * Tested up to WordPress 5.0.3.

= 1.3.2 =
Release date 9 January 2019

 * Fix: Password protected categories were incorrectly redirecting to a 404 page on some sites.

= 1.3.1 =
Release date 9 January 2019

 * Fix: Bug with {title} tag when using category_login shortcode.

= 1.3 =
Release date 9 January 2019

 * New: Added support for {title} placeholder tag. This can be used on the login page to show the title of the current post or category. Configure from the settings page (Settings -> Protected Categories).
 * New: Improved caching prevention for protected categories and posts.
 * Various bug fixes.
 * Tested up to WordPress 5.0.2.

= 1.2.2 =
Release date 6 September 2018

 * Fix: 'exclude_tree' option in get_terms is no longer overridden, but merged with the list of protected categories.
 * Fix: Ensure comments don't display on password login form.

= 1.2.1 =
Release date 29 May 2018

 * New: Added WPML config file.
 * Fix: Bug with 'Show protected categories' option.
 * Tweak: Changed documentation link on Plugins page.

= 1.2 =
Release date 24 May 2018

 * Dev: Code restructure and various improvements.
 * Dev: Tested with WP up to 4.9.6.

= 1.1.4 =
Release date 7 June 2017

 * Fix: Bug on redirect from central login page using [category_login] shortcode.

= 1.1.3 =
Release date 6 June 2017

 * Fix: Potential conflict with WordPress 4.8.
 * Tweak: Cache hidden categories to improve performance.

= 1.1.2 =
Release date 30 May 2017

 * Fix: Javascript bug for password field in admin.
 * Fix: Hidden posts were incorrectly shown on their category/custom taxonomy page.

= 1.1.1 =
Release date 30 May 2017

 * Fix: Single posts in password protected categories were not protected (bug introduced in previous update).
 * Fix: Password protection now works correctly for pages and attachments.

= 1.1 =
Release date 13 April 2017

 * Note: Any logged in users will be automatically logged out after this update.
 * New: New plugin options for customising the login form (password label, title, placeholder, etc).
 * New: Login page option removed from plugin settings as no longer required. Your login page can still be used to login to categories.
 * Fix: Users could access an unlocked category even after the password was amended.

= 1.0 =
Release date 9 March 2017

* Initial release.