=== Admin Toolbar Visibility Control ===
Contributors: yusufmudagal, ekamran
Tags: admin toolbar, admin bar, woocommerce, membership, lms
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Hide the front-end admin toolbar for selected customer-facing roles while keeping administrators protected.

== Description ==

Admin Toolbar Visibility Control gives site owners one central place to control who sees the WordPress admin toolbar on the front end.

WordPress already includes a per-user "Show Toolbar when viewing site" profile option. This plugin is for stores, membership sites, LMS portals, customer dashboards, and client-facing websites where administrators need a role-based policy instead of editing users one by one.

Choose the roles that should not see the front-end toolbar, review user counts and role recommendations, and save the policy from Settings > Admin Toolbar.

= Built for customer-facing WordPress sites =

Use it for:

* WooCommerce customer accounts
* SureCart customer portals
* Easy Digital Downloads buyers
* Paid Memberships Pro members
* MemberPress members
* LearnDash students
* LMS and customer dashboards
* Client-facing logged-in websites

= What stays protected =

* Administrators are never affected.
* wp-admin screens are never affected.
* Logged-out visitors are not affected.
* Roles you do not select are not affected.

= Smart role recommendations =

The settings page detects supported active plugins and highlights relevant customer-facing roles when those roles exist:

* WooCommerce
* SureCart
* Easy Digital Downloads
* Paid Memberships Pro
* MemberPress
* LearnDash

These are recommendations only. You remain in control of which roles are selected.

If no supported plugin is active, you can still use the generic role-based control.

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install it from WordPress.org.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to Settings > Admin Toolbar.
4. Enable toolbar visibility control if you want the policy active.
5. Select the roles that should not see the front-end toolbar.
6. Save your changes.

== Frequently Asked Questions ==

= Will this affect wp-admin or the block editor? =

No. The plugin only controls the front-end toolbar. wp-admin screens, including the block editor, are never affected.

= Can administrators lose access to the toolbar? =

No. Administrators are protected and will continue to see the toolbar.

= Does this replace WordPress's per-user toolbar profile option? =

No. WordPress still has the per-user setting. This plugin adds centralized role-based control for site owners.

= Are any roles hidden automatically? =

No. The plugin can recommend common customer-facing roles, but you choose and save the roles yourself.

= Does this work with custom roles? =

Yes. Any editable role except Administrator can be selected from the Role Selection table.

= Does this use CSS to hide the toolbar? =

No. The plugin uses WordPress's `show_admin_bar` filter.

= Does this track users or send data externally? =

No. The plugin does not track users, send external requests, or include upsells.

= Does the plugin include Hindi translations? =

Yes. The settings screen includes bundled Hindi translations for sites using the Hindi locale.

== Screenshots ==

1. Settings page showing global status, detected integrations, role selection, and summary in a clearer section layout.
2. Detected integrations and recommended customer-facing roles in the settings screen.
3. Plugins screen showing Admin Toolbar Visibility Control active.
4. Front-end view confirming administrators still keep the WordPress toolbar.

== Changelog ==

= 2.0.2 =
* Improved settings page hierarchy, spacing, responsive behavior, and version visibility.
* Improved settings notice placement on the plugin settings page.
* Added WordPress Playground blueprint support for the WordPress.org Live Preview flow.
* Added requirement metadata to the main plugin file for WordPress.org compatibility parsing.

= 2.0.1 =
* Improved role-selection accessibility with explicit checkbox labels and a screen-reader table caption.
* Added settings feedback output on the settings screen.
* Added bundled Hindi translations for the plugin settings screen.
* Updated the author URL.
* Improved screenshot captions for a more user-focused plugin listing.

= 2.0.0 =
* Renamed plugin to Admin Toolbar Visibility Control.
* Kept the original main plugin file for backward compatibility.
* Added Settings > Admin Toolbar.
* Added role-based front-end toolbar visibility control.
* Added administrator and wp-admin protections.
* Added WooCommerce, SureCart, Easy Digital Downloads, Paid Memberships Pro, MemberPress, and LearnDash detection.
* Added user counts and role recommendations in the settings screen.

= 1.0 =
* Initial launch.

== Upgrade Notice ==

= 2.0.2 =
Settings page polish, responsive layout improvements, and WordPress.org Live Preview support.

= 2.0.1 =
Hindi translation, accessibility, and listing polish for the settings screen.

= 2.0.0 =
Major revival release. The plugin now uses settings-based role control instead of globally hiding the toolbar for everyone.
