=== Nexu Content Restrictor ===
Contributors: nexuvibe
Tags: content restriction, membership, private content, access control, user roles
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 2.9.0
Requires PHP: 7.4
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Professional content restriction plugin with advanced visibility controls for posts, pages, and custom post types.

== Description ==

**Nexu Content Restrictor** is a powerful, secure, and user-friendly plugin for controlling access to your WordPress content. Restrict posts, pages, and custom post types based on user roles, login status, or specific users.

= Key Features =

* **Global Restrictions** - Apply site-wide access controls
* **Post Type Restrictions** - Set default restrictions for any post type
* **Individual Content Control** - Override global settings on specific posts
* **Multiple Visibility Options:**
  - Everyone (public)
  - Members only
  - Guests only  
  - Selected user roles
  - Selected individual users
* **Custom Redirects** - Set custom redirect URLs for restricted content
* **Modern Admin Interface** - Beautiful, intuitive settings page
* **100% Secure** - Built with WordPress security best practices
* **Translation Ready** - Fully translatable
* **Developer Friendly** - Clean code with hooks and filters

= Perfect For =

* Membership sites
* Client portals
* Online courses
* Premium content
* Private communities
* Staff-only sections

= Security First =

This plugin is built with security as the top priority:
* All inputs are sanitized
* All outputs are escaped
* Nonce verification on all forms
* Capability checks on all actions
* No external dependencies
* Regular security audits

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/nexu-content-restrictor/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Content Restrictor → Settings to configure
4. Set global restrictions or use the meta box on individual posts

== Frequently Asked Questions ==

= Can I restrict specific posts without affecting others? =

Yes! Each post has a meta box where you can set individual restrictions that override global settings.

= Does this work with custom post types? =

Absolutely! The plugin automatically detects all public post types.

= Can administrators bypass restrictions? =

Yes, you can enable "Exclude Administrators" in the global settings.

= Is it compatible with membership plugins? =

Yes! It works with any plugin that uses WordPress user roles.

== Screenshots ==

1. Modern settings page with tabbed navigation
2. Post/Page restriction meta box
3. Global restriction settings
4. Post type specific restrictions

== Changelog ==

= 2.9.0 =
* Added guide popup with plugin usage instructions
* Visual guide showing metabox screenshot for per-post control
* Improved documentation access from settings header

= 2.8.0 =
* Added welcome page for first-time activation
* Beautiful onboarding experience with feature highlights
* Automatic redirect to welcome page on first visit
* Improved user experience for new users

= 2.7.0 =
* Changed color scheme from Orange to Indigo/Violet
* Consistent color palette with other Nexuvibe plugins
* Updated gradients and accent colors

= 2.6.0 =
* Fixed toggle switch styling issues
* Fixed color palette consistency
* Improved CSS selector specificity for toggle components
* Better RTL support for toggle switches

= 2.5.0 =
* Complete UI redesign to match NexuStats design system
* Added Outfit font for modern typography
* New section-based layout for settings
* Improved header with status badge
* Enhanced navigation rail styling
* Better responsive design
* Improved toggle switches and form controls
* Modern alert and notification system
* Consistent styling across all Nexuvibe plugins

= 2.4.0 =
* Added "Return to Original Page After Login" feature
* Users are now automatically redirected back to the page they were trying to access after logging in
* Smart detection of WordPress login pages for automatic redirect_to parameter injection
* New toggle setting in Redirect tab to enable/disable this feature
* Enhanced user experience: seamless return to restricted content after authentication
* Works with WordPress default login page and custom login URLs
* Default enabled for better UX

= 2.3.3 =
* Fixed initial state of post type settings fields
* All fields now hidden by default when post type restriction is disabled
* Only main toggle switch visible until restriction is enabled
* Improved UX: cleaner interface, no clutter
* Better conditional display logic for all field groups

= 2.3.2 =
* Fixed duplicate translation entry for "Default Redirect URL"
* Changed "Default Redirect URL" in Redirect tab to "Global Redirect URL"
* Clear distinction between Post Type and Global redirect URLs
* Updated translation file (140 entries)
* Recompiled .mo file with fixes

= 2.3.1 =
* Updated translation file with all new strings
* Added Help tab translations (139 total entries)
* Added role-specific redirect translations
* Changed Help tab colors from purple to blue
* Compiled .mo file with complete translations
* Translation-ready for Persian (fa_IR) locale

= 2.3.0 =
* Added default redirect URL for each post type
* Implemented role-specific redirect URLs for post types
* Each user role can now redirect to a different URL per post type
* Smart redirect priority: Individual post > Role-specific > Post type default > Global default
* Intelligent fallback system for redirect URLs
* Enhanced UI with toggle for enabling role-specific redirects
* Beautiful card-based UI for role redirect configuration
* Automatic sanitization and validation of all redirect URLs

= 2.2.0 =
* Added comprehensive Help tab with step-by-step tutorials
* Clear distinction between individual post and global restrictions
* Visual priority order explanation
* Common questions and answers section
* Beautiful gradient-styled help sections
* Easy-to-follow usage examples

= 2.1.0 =
* Added Plugin Access Control: Control which user roles can access settings
* Administrator role always has access (cannot be removed)
* Users without access cannot see menu or meta box
* New Permissions system for enhanced security
* Critical security warnings for access control settings
* Granular permission checks throughout the plugin

= 2.0.0 =
* Major cleanup: Removed import/export functionality
* Removed URL Fixer tool (temporary feature no longer needed)
* Streamlined codebase for better performance and maintainability
* Focused on core content restriction features
* Reduced plugin size and complexity

= 1.8.0 =
* Added URL Fixer tool for correcting redirect URLs after import
* New admin page to bulk update domain names in redirect URLs
* Created fixed JSON file with corrected domains (demoabzar.com → abzarwp.com)
* Ability to search and replace domains in all imported restriction settings
* Helpful for fixing incorrect URLs after data migration

= 1.7.0 =
* Added Debug Mode setting for security-conscious error handling
* Error messages now only show detailed information when Debug Mode is enabled
* Generic error messages shown by default for production environments
* Enhanced security by hiding sensitive error details from non-administrators
* Added security warning for Debug Mode in Advanced settings

= 1.6.0 =
* Fixed import functionality for WPPCP data export files
* Improved error handling and validation for JSON imports
* Better error messages for import failures
* Fixed handling of empty visibility values in import data
* Enhanced file type detection for uploaded JSON files

= 1.5.0 =
* Updated license to GPL v3
* Improved UI/UX for better user experience

= 1.4.0 =
* Enhanced vertical tab navigation styling
* Bolder and larger tab labels
* Improved icon sizing for better visibility

= 1.3.0 =
* Fixed conditional fields logic for post type restrictions
* Improved role selection visibility toggle

= 1.2.0 =
* Added role selection functionality for post type restrictions
* Improved toggle switch alignment
* Enhanced JavaScript for better conditional field handling

= 1.1.0 =
* Added data import functionality
* Support for importing restrictions from WPPCP JSON exports
* Improved admin UI consistency

= 1.0.0 =
* Initial release
* Global site restrictions
* Post type restrictions
* Individual post restrictions
* Multiple visibility options
* Custom redirect URLs
* Modern admin interface
* Full translation support
* Security hardened

== Upgrade Notice ==

= 2.1.0 =
Important security feature: New Plugin Access Control allows you to specify which roles can manage restrictions. Administrator access cannot be removed.

= 2.0.0 =
Major version: Import/Export features removed. Plugin now focused on core content restriction only. Lighter and faster!

= 1.7.0 =
Security enhancement: Error messages now require Debug Mode to show details. Enable in Advanced settings only for troubleshooting.

= 1.5.0 =
License updated to GPL v3 for better compatibility and freedom.

= 1.0.0 =
Initial release of Nexu Content Restrictor.

== Privacy ==

This plugin does not collect any user data. All restriction settings are stored locally in your WordPress database.

