=== WP Desktop Admin ===
Contributors: Codexist Labs
Author URI: https://codexist.co.za
Plugin URI: https://codexist.co.za/plugins/wp-desktop-admin
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.2.0
License: Proprietary - All Rights Reserved (c) Codexist Labs
Text Domain: wp-desktop-admin

Turns the WordPress admin into a desktop workspace, with every screen in its own window.

== Description ==

WP Desktop Admin puts a desktop over the WordPress admin. Every admin screen
opens in its own draggable, resizable window, so you can have Orders, Products
and Analytics side by side instead of tabbing between them.

**What you get**

* Draggable, resizable windows for every admin screen, with snap zones on the left, right and top edges
* A taskbar showing open windows, a clock and a notification bell
* A start menu that searches top-level screens and their sub-pages
* Desktop icons for every admin menu item your role can reach, with sub-pages on right-click
* Keyboard shortcuts for switching, snapping, maximising and closing windows
* Tile, cascade and show-desktop layouts from the desktop right-click menu
* Per-user wallpaper, accent colour, theme, taskbar position and icon size
* Optional window layout memory, so you reopen where you left off
* Full touch support for drag, resize and icon interaction

**Built to stay out of your way**

* One click back to the classic admin, from the start menu, the admin bar or the plugins list
* If the desktop script ever fails to start, the classic admin is restored automatically
* Windows never widen permissions. Every user only ever sees the screens their role allows
* Nothing is added to the front end of your site, and no shortcodes are registered

**For developers**

Four filters cover the common cases without touching plugin files:

* `wpda_css_vars` - every desktop colour, radius and timing, as CSS custom properties
* `wpda_default_settings` - the appearance defaults a new user starts with
* `wpda_user_is_eligible` - whether a given user is offered the desktop
* `wpda_menu_items` - the desktop icon and start menu list, after capability filtering

== Installation ==

1. Upload the `wp-desktop-admin` folder to `/wp-content/plugins/`, or install the zip from Plugins, Add New, Upload Plugin.
2. Activate the plugin.
3. Go to Settings, Desktop Admin to choose who gets the desktop and to set your own wallpaper and theme.

== Frequently Asked Questions ==

= How do I get the normal admin back? =

Choose Classic admin in the start menu, or use the Desktop Mode switch in the
admin bar, or the Turn desktop off link on the Plugins screen. The choice is
saved per user, so it does not affect anyone else.

= Can editors and other roles use it? =

Yes. Set Offer the desktop to on the Access tab. Anyone offered the desktop gets
their own Desktop Admin screen under their profile for wallpaper and theme.

= Does it change what a user can do? =

No. Windows are ordinary admin screens in an iframe, so every capability check
WordPress normally performs still applies.

= Does it work with page builders and the block editor? =

Yes, in a window. Very wide interfaces are more comfortable maximised, which is
a double-click on the title bar or Ctrl+Alt+Up.

= Does it slow the admin down? =

The shell is one stylesheet and one script, both under 35KB, with no external
dependencies and no jQuery on the desktop itself. Screens still load exactly as
WordPress loads them.

== Changelog ==

= 1.2.0 =
* New: screens opened inside a window now stay inside it. Links, forms and redirects keep frame mode, so clicking through no longer nested the whole desktop inside a window
* New: Desktop Mode switch in the admin bar, the start menu and the plugins list, so the classic admin is always one click away
* New: automatic recovery. If the desktop script fails to start, the classic admin is restored with an explanation instead of leaving a blank screen
* New: keyboard shortcuts for the start menu, help, window cycling, snapping, maximising, minimising, closing and show desktop, and they work from inside a window too
* New: help and shortcuts panel, on the taskbar and as a tab on the settings screen
* New: tile and show-desktop layouts, alongside cascade
* New: opening a screen that is already open now raises that window instead of duplicating it
* New: optional window layout memory, per user
* New: accent colour setting, wallpaper dimming, and a reduced-motion option
* New: start menu search now covers sub-pages, not just top-level screens
* New: arrow-key navigation for desktop icons, plus aria roles and visible focus throughout
* New: real admin icons. Dashicons and plugin icons are used directly, replacing the emoji map that only covered common menus
* Fix: framed requests recursed until PHP's execution limit killed them, because the URL filter called the function it was filtering
* Fix: windows never loaded their screen, because the iframe was cloned from a template and so had nothing to navigate
* Fix: window titles showed the full WordPress breadcrumb instead of just the screen name
* Fix: the desktop mode link was HTML-escaped where the shell needed a raw URL
* Fix: the frame flag was appended to stylesheet and script URLs, changing cache keys for no reason
* Fix: a window opened from a link inside another window was dropped from the saved layout, because its URL was relative
* Fix: desktop icons ran along the top instead of filling downwards in columns
* Fix: the access rule was stored in per-user meta, so setting it to Editors had no effect. It is now a site option, and non-administrators can save their own appearance
* Fix: notification counts are now filtered by capability, so a user is never told about updates they cannot see
* Fix: submenu pages registered under a .php parent built the wrong URL
* Fix: separators and capability-less items no longer produce empty desktop icons
* Fix: windows are pulled back into view when the browser window shrinks
* Fix: minimising a maximised window and restoring it now returns it to maximised
* Change: settings are split into Appearance, Access, Help and About tabs, with a help modal on each control
* Change: all inline CSS and JavaScript moved into dedicated asset files
* Change: every user-facing string is now translatable, with a .pot file included
* Change: the desktop is skinned entirely with CSS custom properties, so a site can restyle it through the wpda_css_vars filter
* Change: minimum WordPress raised to 6.0, and the host is checked on load rather than risking a fatal
* Change: uninstall now removes the site option and every per-user key, on single sites and multisite

= 1.1.0 =
* Added notification bell with live update and comment counts
* Added WP Media Library picker for wallpaper images
* Settings saved per user in user meta rather than site-wide
* Added touch support for drag, resize and icon interaction
* Added snap zones

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.2.0 =
Windows no longer nest the desktop inside themselves, and there is always a way
back to the classic admin. The access rule moves from per-user meta to a site
option, so check Settings, Desktop Admin, Access after updating. Existing
wallpaper and theme preferences are kept.
