=== PureDash Cleaner ===
Contributors: boulkely, rahajason
Tags: admin, interface, cleanup, hide elements, zen mode
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Clean up your WordPress admin interface by hiding annoying elements with a click. Enhanced Edition.

== Description ==

PureDash Cleaner is an enhanced WordPress plugin designed to clean up the WordPress admin interface by allowing users to hide annoying or redundant elements with a single click. It features a "Zen Mode" for interactive element selection and a robust system for persistent or session-based blocking.

== Privacy Policy ==

This plugin utilizes the Freemius SDK to provide optional usage tracking and support services. Data is only sent to freemius.com if you explicitly opt in during activation. For more information, please refer to the Freemius Privacy Policy: https://freemius.com/privacy/

== Installation ==

1. Upload the `puredash-cleaner` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Settings > PureDash Cleaner** to access the plugin settings page.

== How to Use ==

= Hiding an element with Zen Mode =

1. Log in to your WordPress admin as an administrator.
2. Look for the **PureDash Cleaner** entry in the top admin bar (black bar at the top). Click it to open the submenu.
3. Click **Toggle Zen Mode**. The page will enter selection mode — a blue highlight will follow your cursor as you move over admin elements.
4. Hover over any element you want to hide (a menu item, a dashboard widget, an admin notice, etc.) and click it.
5. A dialog will appear. Optionally give the element a label so you can identify it later, then click **Hide Element** to confirm.
6. The element is now hidden for all admin sessions for your user. It will be hidden every time you load an admin page.

= Viewing and managing blocked elements =

1. Go to **Settings > PureDash Cleaner**.
2. The **Blocked Elements** tab lists every element you have hidden, grouped by category (Main Menu, Admin Bar, Dashboard Widgets, Admin Notices, Miscellaneous).
3. To remove a block, click the **Delete** button next to the element. It will reappear immediately on the next page load.
4. To rename a block's label, click the pencil icon next to its name.

= Safe Mode (emergency recovery) =

If you accidentally hide a critical element (such as the admin menu) and cannot navigate:

* Add `?puredash_safe_mode=1` to any admin URL, for example: `https://yoursite.com/wp-admin/?puredash_safe_mode=1`
* Or go to **Settings > PureDash Cleaner > Help & Safe Mode** and click **Activate Safe Mode**.

Safe Mode temporarily disables all blocks so you can access the settings page and delete the problematic entry.

= Developer kill switch =

You can disable the plugin entirely without deactivating it by adding the following line to your `wp-config.php`:

`define( 'PUREDASH_DISABLE', true );`

== Frequently Asked Questions ==

= Where is the settings page? =

Go to **Settings > PureDash Cleaner** in the WordPress admin menu, or click **PureDash Cleaner** in the top admin bar and choose **Settings**.

= I accidentally hid the admin menu. How do I get it back? =

Add `?puredash_safe_mode=1` to your admin URL (e.g. `https://yoursite.com/wp-admin/?puredash_safe_mode=1`). This temporarily disables all blocks so you can navigate to the settings page and delete the rule.

= Does this hide elements for all users or just me? =

Blocks are applied site-wide for all logged-in administrators. If you want to test visibility without removing a block, use Safe Mode (see above).

== Screenshots ==

1. The PureDash Cleaner settings page showing blocked elements, grouped by category (Main Menu, Admin Bar, Dashboard Widgets, Admin Notices, Miscellaneous).
2. Zen Mode active: hover over any plugin element to highlight it in blue before hiding it.
3. Zen Mode active: hover over any admin menu to highlight it in blue before hiding it.
4. The "Hide Element" dialog, where you can optionally label an element before confirming.
5. Editing or deleting a blocked element directly from the Blocked Elements list.
6. The Safe Mode recovery option, accessible from Settings > PureDash Cleaner > Help & Safe Mode.
7. The Safe Mode recovery message

== Changelog ==

= 1.2.8 =
* Replaced the textual promo banner with an image banner in the "Hide Element" modal for a cleaner look.

= 1.2.7 =
* Fixed admin bar "PureDash Cleaner" link pointing to a non-existent page (admin.php) instead of the correct settings page (Settings > PureDash Cleaner).
* Expanded readme with a full "How to Use" section, FAQ, and Safe Mode recovery instructions to help users configure and use the plugin from scratch.

= 1.2.6 =
* Security: Added CSS-context sanitization for selector values output via wp_add_inline_style() to prevent potential CSS injection.
* Updated Freemius SDK to 2.13.2.
* Added plugin owner to the Contributors list in readme.txt.

= 1.2.5 =
* WordPress.org release: removed premium-only code and upgrade links.
* Fixed the "Edit Label" action on the Blocked Elements list.
* Simplified the Hide Element dialog.

= 1.0.3 =
* Updated version to 1.0.3.

= 1.0.2 =
* Renamed plugin to PureDash Cleaner for WordPress.org compliance.
* Ensured compatibility with official directory requirements.
* Integrated Freemius SDK with Org-compliant configuration.
* Removed inline styles and scripts for better security.
