=== DamaSoft FocusDesk ===
Contributors: damasoft
Tags: focus mode, hide admin menu, declutter, woocommerce, dashboard
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keep only the WordPress and WooCommerce admin screens you need, with one visible switch and personal focus presets.

== Description ==

FocusDesk adds a single, quiet, animated switch to your admin. Flip it and everything you do not need disappears: menus, submenus, dashboard widgets, toolbar items, meta boxes, list-table columns, admin notices. Flip it back and everything returns, exactly as it was.

It is a **per-user** tool. Your rules are yours; a colleague on the same site keeps their own. Administrators can additionally publish shared presets and pick a starting preset per role.

**It analyses your site first.** After activation, open FocusDesk and visit the admin pages you want to organise. FocusDesk maps the menus, submenus, widgets and toolbar nodes those pages render — including items added by other plugins — groups them by vendor (WordPress core, WooCommerce, SEO, page builders, forms, security, cache, backup…), and gives your admin a *noise score* so you can see how much of it is really yours.

= What it does =

* **One floating switch** — always visible, never in the way. Drag it anywhere, double-click to fold it into a discreet handle, or use `Shift + Alt + F`.
* **A dedicated admin colour scheme** while focus is on, tinted with the accent colour you choose, plus a soft glowing border and a toolbar badge. Your own colour scheme comes straight back when you switch off.
* **Presets with an identity** — Zen, Writing, Shop, Orders only, Design, Maintenance. Each one has its own colour and icon: the switch shows which mode you are in, and the whole admin is repainted to match. One click and the rules are filled in for you; refine anything afterwards.
* **An element picker** — click any element in the admin and it is hidden from then on. No CSS knowledge needed.
* **A dashboard widget** with the noise score, the switch and the quick presets.
* **WooCommerce aware** — understands HPOS order screens, Analytics, Marketing, and can switch the heavy Analytics module off while you are focused.
* **Nothing is deleted, no permission changes.** FocusDesk hides interface, it is not a security plugin: a hidden screen is still reachable by direct URL for anyone who could already open it.

= Three ways out, always =

1. The floating switch, which is never hidden.
2. The **emergency reset** inside the toolbar badge: focus off, every rule cleared.
3. `define( 'DSFD_DISABLE', true );` in `wp-config.php` disables FocusDesk site-wide without deactivating it.

= Privacy =

FocusDesk stores its settings, presets, discovered interface map and per-user preferences in your own database. It makes no external connections. Uninstalling removes its stored data unless you choose to retain it.

= Languages =

The interface uses Italian on Italian WordPress installations and English as the source-language fallback elsewhere. WordPress.org community translations take precedence. The installable package does not contain POT, PO or MO catalogs.

== Installation ==

1. Upload the `damasoft-focusdesk` folder to `/wp-content/plugins/`, or install the ZIP from Plugins → Add New → Upload.
2. Activate, then open **Settings → FocusDesk** (non-administrators find it under **Profile → FocusDesk**). Visit the admin pages you use so FocusDesk can discover their visible elements.
3. Pick a preset or make your own choices, then flip the switch in the corner.

== Frequently Asked Questions ==

= Is FocusDesk completely free? =

Yes. All included features are available without an account, activation key or paid edition. Custom presets and CSS rules have no edition-based quantity limits.

= Does it change my dashboard immediately after activation? =

Focus Mode starts off. Hiding rules and the temporary colour scheme apply only when you turn it on, and only to your own account. You can turn it off at any time or use the toolbar emergency reset. The dashboard widget can be hidden through WordPress Screen Options or disabled in FocusDesk settings; the floating switch and toolbar badge can also be disabled in settings. The first-run notice is dismissible and shown only once. There are no upgrade advertisements or forced redirects after activation.

= Does hiding a menu stop someone from opening that screen? =

No. FocusDesk is a decluttering tool, not a permission system. Capabilities are untouched, and a hidden screen still answers on its direct URL. If you need real restrictions, use a role editor.

= Does each user get their own rules? =

Yes. Rules and the on/off state live in user meta, so everyone shapes their own admin. Administrators can save shared presets and set a starting preset per role.

= What happens to my admin colour scheme? =

While focus is on, FocusDesk temporarily switches you to its own scheme, built on the core Midnight canvas and repainted with your accent colour. Your own choice is never overwritten — it comes back the moment you switch off, and saving your profile while focused cannot store the temporary scheme.

= It hid something I need and I cannot find the settings. =

Use the emergency reset in the toolbar (the Focus badge), or add `define( 'DSFD_DISABLE', true );` to `wp-config.php`.

= Is it compatible with WooCommerce HPOS? =

Yes — compatibility with custom order tables and cart/checkout blocks is declared, and the presets resolve the right order screen whether HPOS is on or off.

= Does it work on multisite? =

Yes, per site. The network admin is never touched, by design.

= Can I hide something FocusDesk did not list? =

Yes, with the element picker in the quick panel, or by pasting CSS selectors under Screens → Custom rules.

== Screenshots ==

1. The floating switch, at rest and active.
2. The overview: noise score, what was found, and the presets.
3. Choosing what to hide, grouped by what added it.
4. The dashboard widget.

== Changelog ==

= 1.1.4 =
* Improved admin stylesheet integration using native WordPress enqueue functions for dynamic colours and Focus rules.
* Preserved colours, presets, personal rules, settings and reversible Focus behaviour.

= 1.1.3 =
* Made custom presets and CSS rules available without edition-based quantity limits.
* Preserved existing settings, personal rules, focus modes and user permissions.

= 1.1.2 =
* Preserved the Italian interface without depending on bundled translation catalogs, so the Free package can use the DamaSoft WordPress.org publication workflow.
* Kept existing settings, personal rules, presets, focus state and user permissions unchanged.
* Preserved WordPress.org community translations when available.
* Added keyboard navigation and explicit screen-reader associations to settings tabs without changing their layout.

= 1.1.1 =
* Updated the public DamaSoft product and author URLs.
* Aligned the runtime WordPress requirement with the declared 6.5 minimum.
* Confirmed the WooCommerce compatibility header through 11.1.

= 1.1.0 =
* The switch now names the mode you are in — "Zen", "Writing", "Orders only" — instead of a generic "Focus", and wears that mode's icon.
* Every mode has its own colour: the admin scheme, the switch, the toolbar badge and the glowing border all repaint when you change mode, so you always know where you are. Custom presets get a colour of their own too, and administrators can turn the behaviour off in Look & feel.
* The quick panel opens upwards from the switch instead of pushing it out of the way, and lists every mode with its colour.
* Fewer queries: the freshness marker moved inside the site map (a transient cost two queries per page view), the first-run notice no longer needs one, and presets are resolved once per request.
* Fixed: the toolbar icon rendered as a blank box, and the primary-button repaint never applied because `wp-core-ui` sits on `<body>` itself.
* Verified on WordPress 7.1 with WooCommerce 11 (HPOS), Yoast SEO and Contact Form 7.

= 1.0.0 =
* First public release.
* Site analysis with vendor grouping and noise score.
* Per-user rules for menus, submenus, dashboard widgets, toolbar nodes, meta boxes, list-table columns and custom selectors.
* Six built-in presets plus custom presets and per-role defaults.
* Dedicated admin colour scheme, glowing border, toolbar badge, animations.
* Element picker, dashboard widget, import/export, emergency reset.
* WooCommerce and HPOS aware. Italian translation included.

== Upgrade Notice ==

= 1.1.4 =
Improved WordPress stylesheet integration. Existing settings, personal rules and Focus behaviour are preserved.

= 1.1.3 =
All included features remain completely free, with no edition-based limit on custom presets or CSS rules. Existing settings are preserved.

= 1.1.2 =
Italian interface independent of bundled translation catalogs, with accessible settings tabs. Existing personal rules and presets are preserved.

= 1.1.1 =
Metadata and compatibility alignment; existing user rules and presets are preserved.

= 1.1.0 =
Each focus mode now has its own name and colour on the switch, and the plugin does less work per admin page.

= 1.0.0 =
First release.
