=== PanelKind ===
Contributors: wpadminer
Tags: admin, dashboard, client, roles, white label
Requires at least: 6.6
Tested up to: 7.1.4
Requires PHP: 8.1
Stable tag: 1.6.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Create focused client workspaces with custom navigation, dashboards, private information pages and role-aware access policies.

== Description ==

PanelKind gives clients the tools they need while protected agency owners retain full administration.

Developed by [Byteflow Software](https://byteflowsoftware.co.uk).

WordPress, made welcoming.

* A full-screen management workspace organised into Roles & Permissions, Dashboard Widgets, Informational Pages and Admin Styling.
* Dedicated styling pages for branding, colours, shadows, corners, sidebar icons and interface options.
* Per-View styling with a live sample, contrast checks and shared icon controls in the sidebar editor.
* Reusable views with role priorities and individual user assignments.
* Browsable role/user previews with saved-draft or published settings and a persistent Exit preview button.
* Custom roles linked to existing permission bases, each with independent Views and access rules.
* Rename, reorder and hide navigation items and submenus without modifying post types or content.
* Add shortcuts, separators and custom admin information pages.
* Independent Allow, Deny and Inherit access rules, individual exceptions and mandatory restrictions.
* Server-side screen guards, capability checks and mapped WordPress REST operation guards.
* A dedicated client home or a customised native WordPress dashboard.
* Welcome, information, quick-action, recent-content, overview, checklist and support widgets.
* Visual rich-text editing using WordPress's editor and media library.
* Private information pages with audience rules and top-level or Help placement.
* Branding, accent colours, density, sidebar width, footer text and toolbar cleanup.
* Drafts, explicit publishing review, revision restoration and configuration activity history.
* Templates and validated configuration import/export with personal assignments excluded.
* Owner recovery mode, stale-lock recovery and owner-only native role management.

The plugin has no external service dependency, telemetry, subscription or build step on the installed site. Node is used only for development and tests.

== Installation ==

1. Upload panelkind-1.5.0.zip through Plugins > Add Plugin > Upload Plugin.
2. Activate as the administrator who will be the initial agency owner.
3. Open PanelKind. Its full-screen workspace has three feature sections.
4. In Roles & Permissions, create or open a role. Use Permissions to set access, then Sidebar & View to assign and edit its menu.
5. Use Dashboard Widgets for widget content, audiences, placements and dashboard layouts.
6. Use Informational Pages for private guides, sidebar labels, audiences and View placement. Save the draft.
7. Choose Preview, select a role or user, explore their workspace, and use Exit preview to return. Review the publication impact, then publish.

Activation does not change existing users' views or permissions. A configuration becomes active only after publishing. This release supports single-site WordPress and refuses multisite activation.

== Frequently Asked Questions ==

= Can I update an existing WP Adminer installation? =
Yes. PanelKind is the new product name. Upload panelkind-1.5.0.zip and choose Replace current with uploaded. The installed wp-adminer folder and entry point are retained so the update preserves workspaces, drafts, roles, permissions and client branding. Existing exports, API routes and integration hooks remain compatible. The old wp adminer recover command remains an alias for wp panelkind recover.

= How do custom roles work? =
Create a role under Roles & Permissions and choose an existing WordPress or plugin role as its permission base. Its native capabilities stay linked to that base while PanelKind is active; changes synchronise on the next request. Each custom role has its own View assignment and access rules, with its sidebar editor directly inside the role. Base-role Views and PanelKind rules are not inherited, and users do not also join the base role. PanelKind management capabilities are excluded from inheritance. Linked roles cannot be used as bases. If a base disappears, linked roles receive account access only until repaired.

= When do role changes take effect? =
Native role creation, renaming and permission-base changes take effect immediately. Only agency owners can make these changes. View assignments and access rules must be saved and published. Publish first, then assign users through WordPress Users. Individual assignments and highest-priority role assignments retain their normal precedence. A native Allow capability is still required even when the workspace rule says Allow.

= Can I remove or export custom roles? =
Only roles created in the custom-role editor can be edited or deleted there. Move members to another role and remove any default-registration setting, published/draft View assignment, access policy and content audience references before deleting a role. Role definitions are site-specific, outside configuration revisions and exports. Create matching role IDs on a destination site before importing assignments. Assigned/default roles survive uninstall with their last native capabilities.

= How does workspace preview work? =
Protected agency owners can choose a role or user and saved draft or published settings. Preview opens actual WordPress admin screens, including post lists, the block editor, plugin pages, dashboards and nested sidebars. The selected subject cannot have native permissions beyond the owner’s. Optional View overrides preserve the subject’s permissions; protected owner users retain full administration. Pending configuration edits are saved to the draft without publishing.

Preview is browse-only: form saves, destructive actions, REST saves and non-read AJAX requests are blocked. A database guard prevents writes during preview requests. Saving controls and checklists are disabled. Native Add New and Quick Draft may create temporary auto-drafts, which are removed on exit or scheduled cleanup after expiry. Existing content and persistent role assignments are unchanged.

User preview uses the selected user’s identity, individual access and content ownership. Role preview temporarily overlays the role’s capabilities on your current account, including roles with no members; content ownership follows your account. It excludes your individual workspace exceptions and personal checklist state. Choose a user to inspect their personal content.

A fixed Exit preview control returns to PanelKind. Change preview reopens the picker. Original authentication cookies remain intact. Preview applies across this site’s admin tabs in the same browser session and expires after one hour. Expired and denied pages include an exit link; exit never depends on the target’s permissions or nonce age. Opening PanelKind directly also exits.

Third-party callbacks and dashboard hooks run under the preview identity. Screens needing write requests to render may not work. File writes, outbound service calls and external persistent-cache side effects are outside the database guard and require site-specific compatibility checks.

= Does renaming Posts change the post type? =
No. The navigation label changes only for the selected view. Post type registration, content, frontend URLs and REST identities remain unchanged. Screen titles retain their native names.

= Does hiding a menu protect the page? =
No. Navigation visibility and access are separate controls. Set Deny in Access rules to restrict a supported resource. WordPress's own capabilities are always required, even when a PanelKind rule says Allow.

= How are conflicting rules resolved? =
Protected owners bypass PanelKind restrictions. Other users are subject to mandatory site restrictions, then explicit individual rules, then explicit role rules (Deny wins), then role defaults (Deny wins), then the site default. Profile access remains available. A missing native capability always prevents access.

= Are all third-party plugin actions protected? =
No. Discovered third-party screens are labelled Screen only. Their separate REST, AJAX, admin-post or other handlers need native capability restrictions and a tested integration adapter. Custom post types that reuse core capabilities may share those capability restrictions. The plugin never claims universal protection of arbitrary plugin endpoints.

= Is information-page content public? =
Pages are stored in private configuration snapshots and rendered only through authorised admin callbacks. They have no frontend post type, feed, sitemap or public REST route. Ordinary images and files linked from pages may still have public WordPress upload URLs.

= Can clients edit their dashboard layout? =
Client home has an administrator-controlled layout. Native WordPress dashboard widgets retain their normal position and collapse preferences. Checklists support per-user or shared completion.

= Can another WordPress Administrator bypass these restrictions? =
A powerful administrator may be able to deactivate this plugin. Use appropriately limited native roles for clients. Choose an appropriately limited permission base such as Editor, Author or Subscriber for custom client roles.

= What happens when a view or widget is removed? =
The validator prevents archiving an assigned view or deleting content still referenced by a view. Reassign users or remove placements first. Archiving a page/widget hides it while retaining its content.

= What happens on deactivation or uninstall? =
Deactivation stops the presentation and policy hooks and retains configuration. Uninstall removes plugin-specific management capabilities. Configuration is retained unless Delete plugin configuration when uninstalling was explicitly enabled. Site content and users are never removed. Assigned custom roles and the default registration role are retained with their last native permissions. Deactivation stops permission-base synchronisation.

= How do I recover access? =
Agency owners always retain native full administration. Use Activity & recovery for a one-hour owner safe mode or stale write-lock recovery. For out-of-band recovery, temporarily define WPA_RECOVERY_MODE as true in wp-config.php. This bypasses workspace restrictions site-wide; remove it after repair. WP-CLI users can run wp panelkind recover to clear a stale write lock.

= Which features are planned for later? =
Multisite, dedicated WooCommerce/forms/SEO adapters, protected file delivery, login-page branding, remote agency template distribution and arbitrary menu reparenting are outside this release. Unknown plugin notices are preserved; there is no blanket notice suppression. The management interface is currently English, with RTL layout support and WordPress translations used where available.

== Licensing ==

Open Settings & tools → License to view your tier. Without an activated license, PanelKind uses Free. You can skip the Freemius connection screen and continue without an account or license. Free includes one active custom View, three widgets, one private information page, one custom role, and Main plus two direct child sections per View. All widget types, role-based access, drafts, preview, publication and recovery are included. Every paid plan enables Pro features; paid plans differ by site allowance.

Agency owners with WordPress plugin activation permission can activate or change a license through the Freemius screens. The license panel reads the plan name, site allowance and activation counts from the license activated on this installation. Local/staging exemptions and unlimited allowances follow the license configuration in Freemius. A full allowance prevents additional activations; it does not deactivate this site.

Use Manage account to deactivate or replace a license, or Sync with Freemius to refresh remote changes immediately. The SDK also synchronizes periodically. Expired licenses follow the continued-use setting in Freemius; cancelled or expired blocking licenses return to Free. Saved workspaces are retained. Connection failures use the SDK's cached status until a successful synchronization.

Pro adds more Views, widgets, pages and roles; nested sections; individual overrides and audiences; reusable templates; portable import/export; advanced admin colours, corners and shadows; and white labelling. Free includes the standard admin theme, logo, accent colour, layout, icons and interface cleanup. Published advanced styles survive a downgrade and can be retained or reset to defaults. Free supports signed same-site configuration backups. Existing published workspaces and access restrictions remain effective after a downgrade, while new paid capacity is blocked.

Paid licenses with update entitlement receive software updates through Freemius. Automatic installation respects the site owner’s WordPress preference. Free users manually install newer ZIPs until a WordPress plugin directory release provides the free update channel.

View plans opens https://byteflowsoftware.co.uk/saas/panelkind/pricing for upgrades.

== External services ==

PanelKind uses Freemius for license activation, account management and software updates. During connection and license management, the bundled SDK communicates with Freemius using relevant site, plugin and account information. The SDK presents its connection and license-activation terms in WordPress.

Service information: https://freemius.com/
Privacy policy: https://freemius.com/privacy/

== Changelog ==

= 1.6.1 =
* Keep the standard admin theme, logo, accent, layout, icons and cleanup available on Free.
* Require Pro for individual workspace/sidebar/toolbar colours, custom corners and shadows; show locked controls with an upgrade explanation.
* Preserve published advanced styling after downgrade, with a Free reset that keeps basic branding.
* Enforce styling entitlements on saves, publication, imports and restores, including drafts saved before license expiry.

* Add explicit main WordPress admin styling scope, including owner screens, with PanelKind editor and recovery isolation.
* Preview native WordPress administration without replacing menu structure or changing access permissions.

= 1.6.0 =
* Add dedicated Admin Styling pages for branding, colours, surfaces, icons and interface options, with per-View previews and shared sidebar icon controls.
* Apply validated themes to native admin and section workspaces; preserve existing appearance until enabled.
* Enforced Free limits and Pro entitlements on configuration writes, imports, publication and custom-role creation.
* Added plan usage, contextual upgrade prompts, signed same-site backups and Pro portable transfers.
* Preserved published workspaces and access rules after downgrade; rechecked paid drafts before publishing.
* Added optional Pro credit removal and paid update delivery before the WordPress directory release.

= 1.5.1 =
* Added Settings & tools → License with the active Freemius plan, site allowance, activation usage and license status.
* No license selects the Free tier. All tiers retain all workspace features; paid plans differ by licensed site allowance.
* Added links to Freemius activation, account management, license synchronization and plan upgrades.
* Site counts respect staging exemptions, unlimited licenses, expiry rules and cancellations. License keys are excluded from PanelKind API responses and configuration exports.

= 1.5.0 =
* Added the Freemius SDK and moved cleanup to its after_uninstall hook so deployment no longer includes a root uninstall.php file.
* Preview now runs inside actual WordPress admin screens with native role/user capabilities and View settings.
* Added browse-only request, REST, AJAX and database guards, with disabled saving controls.
* Kept original authentication intact with fixed Exit and Change preview controls, including denied and expired sessions.
* Added native editor auto-draft cleanup and integration coverage for real admin pages, plugin pages, identity and write protection.

= 1.4.1 =
* Rebranded the plugin, management screens, preview messages and documentation as PanelKind.
* Added the PanelKind logo and native admin menu icon, with forest-green and mint management colours.
* Added PanelKind-named release archives, configuration downloads and recovery command.
* Preserved the installed plugin identity, saved configuration, existing exports and integration contracts.

= 1.4.0 =
* Added role and individual-user workspace previews from the header, role editor, user overrides and section editor.
* Added draft/published source selection, optional View overrides and browsing through nested dashboards and information pages.
* Added a sticky Exit preview action, mobile sidebar toggle and recovery links for expired sessions.
* Kept preview read-only without changing authentication or role assignments; native editing destinations show access information.
* Added session isolation, permission, content-containment and authenticated exit regression coverage.

= 1.3.0 =
* Nested section sidebars per View, with back navigation, breadcrumbs and independent dashboards.
* Visual editor for section trees, item ordering, visibility, labels, icons and movement between sections.
* Section widget/page placement, permission-aware previews and URL context through native admin pages.
* Existing Views keep their original menus until section navigation is enabled.

= 1.2.0 =
* Rebuilt management around three feature suites in a full-screen workspace.
* Embedded sidebar View assignment, renaming, visibility and ordering directly in each role editor.
* Added focused widget and page libraries with content, audience and View-placement editors.
* Moved dashboard layout management into Dashboard Widgets and individual overrides into Roles & Permissions.
* Kept shared Views, templates, plugin settings and recovery available in their related sections.
* Preserved existing configuration and added an explicit Back to WordPress link.


= 1.1.0 =
* Added a Roles & Views workspace with role cards and integrated per-role access editing.
* Added custom roles with linked permission bases, native capability review, rename/edit and safe deletion.
* Added dedicated View creation per role and navigation-editor shortcuts.
* Added owner-only role mutation checks, stale-write protection and missing-base recovery.
* Added six-role integration coverage and independent native-menu/HTTP access checks.


= 1.0.1 =
Inline navigation editor with label fields, visibility switches, expandable submenus, drag reordering, keyboard controls, search and per-item options. Renaming or moving untouched items preserves their visibility.

= 1.0.0 =
Initial single-site release with client views, access policies, dashboards, private information pages and configuration management.
