=== Role Based Content Restrictor ===
Contributors: inzidev
Donate link: https://inzidev.com/
Tags: roles-based-content-restrictor, restrict, content, membership, access-control
Requires at least: 5.8
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

Restrict access to pages, posts, and custom post types by user roles. Redirect unauthorized users to a custom page or a global fallback.

== Description ==
**Role Based Content Restrictor** allows you to restrict access to individual posts, pages, and custom post types based on user roles.  

You can:
* Allow specific roles per page/post.
* Set a **custom redirect page** per post.
* Configure a **global fallback redirect** from the plugin settings.
* Optionally display a message or notice on the redirect page.

Perfect for:
* Membership sites  
* Learning Management Systems (LMS)  
* Intranets and company portals  
* Client dashboards or gated content areas  

Lightweight, developer-friendly, and works with any theme or builder (Elementor, Gutenberg, etc.).

== Installation ==
1. Upload the plugin folder to `/wp-content/plugins/role-based-content-restrictor/` or install directly from the WordPress Plugin Directory.
2. Activate the plugin from **Plugins > Installed Plugins**.
3. Go to **Settings > Role Restrictions** to configure the default redirect.
4. Edit any page/post and use the **Restrict Access** meta box to choose roles and a redirect page.

== Frequently Asked Questions ==

= Will it work with custom post types? =
Yes! The plugin works with all public post types registered in WordPress.

= Can I redirect users to an external URL? =
Not yet. You can redirect them to a page where you handle the external redirect using a simple script or shortcode.

= Does it support multiple roles per page/post? =
Yes, you can select multiple roles for each piece of content.

= What happens if no redirect page is set? =
The plugin will use the global fallback page set in the plugin settings. If that’s not set, users are redirected to the homepage.

== Screenshots ==

1. The global settings page, where you can define a default redirection page for users who do not have the required role.
2. The page/post restriction settings, allowing you to limit access to specific user roles and assign a custom redirection page.

== Changelog ==
= 1.0.2 =
* Minor fixes for submission and compliance with WordPress.org guidelines.

= 1.0.1 =
* Improved compatibility with WordPress.org guidelines (removed `load_plugin_textdomain`).
* Updated text domain and folder structure to match slug.
* Minor code cleanups.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==
= 1.0.1 =
Compatibility update for WordPress.org guidelines. Please update to ensure proper translations and smoother installation.

== About the Author ==
**Inzamam Abbasi** – Professional WordPress Developer with over 10 years of experience, specializing in **custom plugin development** and scalable WordPress solutions.  
I’ve successfully delivered 1,000+ projects, including membership systems, e-learning platforms, booking systems, and more.  

Learn more at [inzidev.com](https://inzidev.com)
