=== DevLemon Admin Notes ===
Contributors: devlemon
Tags: admin notes, private notes, dashboard notes, internal notes, team notes
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Context-aware admin notes with priority, follow-up dates, and an operational attention queue.

== Description ==

**DevLemon Admin Notes** is a context-aware operational notes tool for WordPress administrators and editorial teams.

Instead of acting only as a generic dashboard sticky-note board, it connects internal notes to the content and follow-up workflow around them. A note can live globally in the admin area or be attached to a specific post or page, then be prioritized, scheduled for follow-up, completed, archived, pinned, searched, and surfaced where the work happens.

= What makes the workflow different =

* **Context-aware notes** — attach a note to a specific post or page and see it again in that content's editor.
* **Operational priority** — Low, Normal, High, or Critical priority is stored with each note.
* **Follow-up dates** — add an optional date instead of relying on memory.
* **Attention queue** — the Dashboard automatically promotes overdue, due-soon, critical, and high-priority active notes.
* **Attention filters** — jump directly to Critical, Overdue, or Due Soon notes from the notes screen.
* **Lifecycle without deletion** — complete, reopen, archive, restore, pin, and unpin notes as the work changes.
* **Private ownership** — a private note is query-restricted to its author and cannot be read, edited, deleted, or discovered by another account.
* **Administrator notes** — administrators can create global notes for administrator-level operational information.

= Example workflows =

* Attach "Legal copy must be reviewed again" to a landing page, set it to High priority, and choose a follow-up date.
* Pin a Critical reminder before a campaign launch and let the Dashboard keep it in the attention queue.
* Keep a private troubleshooting note linked to a post without exposing it to other users or the public site.
* Mark a resolved task as Completed, then Archive it later instead of deleting the operational history.

= Privacy =

DevLemon Admin Notes does not collect, transmit, or share data with external services. There is no telemetry, analytics, tracking, advertising, remote API, or external asset request. Notes are stored in the site's own WordPress database.

The internal note post type is non-public, excluded from search, and not exposed through the REST API. Private note ownership is enforced server-side in both permission checks and note queries.

== Installation ==

1. Upload the `devlemon-admin-notes` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Tools → DevLemon Admin Notes** to create your first note.
4. The **DevLemon Admin Notes** widget will appear on your WordPress Dashboard automatically.

== Frequently Asked Questions ==

= What is the attention queue? =

The Dashboard widget ranks active notes that need attention. Overdue notes are promoted first, followed by due-soon notes and higher-priority items. This helps the widget act as an operational follow-up queue rather than a simple recent-notes list.

= Can I add priority and a follow-up date? =

Yes. Each note can use Low, Normal, High, or Critical priority and an optional follow-up date. The notes list includes Critical, Overdue, and Due Soon filters.

= Are notes visible to website visitors? =

No. Notes are stored using an internal, non-public WordPress post type. They never appear on the front-end of your website, in search results, sitemaps, or feeds.

= Are private notes visible to other users? =

No. Private notes are visible only to the user who created them. This is enforced on the server side — no other user can read, edit, delete, or even discover private notes belonging to another user.

= Does the plugin use an external service? =

No. DevLemon Admin Notes is completely self-contained. It does not make any external HTTP requests, send data to external servers, or use any third-party APIs.

= Are notes exposed through the REST API? =

No. The internal post type used to store notes has `show_in_rest => false`. Notes are not accessible through the WordPress REST API.

= What happens when the plugin is deactivated? =

Nothing. Deactivation does not delete any notes or plugin data. Your notes remain in the database and will be available again when the plugin is reactivated.

= What happens when the plugin is deleted? =

Deleting the plugin through the WordPress admin (Plugins → Delete) will permanently remove all notes and any plugin options from your database. This action cannot be undone.

= Does it work with WooCommerce? =

DevLemon Admin Notes does not depend on WooCommerce and does not add any WooCommerce integration in version 1.0.0. It works alongside WooCommerce without conflict.

= Can I attach notes to posts and pages? =

Yes. When editing any post or page, a **DevLemon Admin Notes** meta box appears in the editor sidebar. You can view notes linked to that content and add new ones with a single click.

= Who can create global notes? =

Only users with the `manage_options` capability (Administrators by default) can create and see global notes.

= Who can create private notes? =

Any user with the `edit_posts` capability can create and manage their own private notes.

= Is there a limit to the number of notes? =

No. There is no artificial limit on the number of notes you can create.

== Screenshots ==

1. Operational notes overview with Critical, Overdue, and Due Soon filters.
2. Add or edit a note with visibility, priority, follow-up date, context, and pin controls.
3. Dashboard attention queue prioritizing overdue and high-priority active notes.
4. Post/page editor meta box showing context-linked notes and attention badges.
5. Private and administrator-level global visibility badges.
6. Completed and archived workflow states with restore/reopen actions.

== Changelog ==

= 1.0.1 =
* Added operational priority levels: Low, Normal, High, and Critical.
* Added optional follow-up dates with Overdue and Due Soon states.
* Added a Dashboard attention queue that ranks active notes by urgency, priority, follow-up date, pin state, and recency.
* Added Critical, Overdue, and Due Soon filters to the notes overview.
* Added priority and attention badges to post/page context notes.
* Hardened all state-changing admin handlers so nonce verification and capability checks occur before business data is processed.
* Added defense-in-depth permission checks to the note create, update, and delete model methods.
* Removed the unavailable Plugin URI reported during WordPress.org review.
* Corrected FAQ grammar and expanded setup/workflow documentation.

= 1.0.0 =
* Initial release.
* Privacy hardening: private notes are query-restricted to their author, including for administrator accounts that are not the author.
* WordPress.org-ready DevLemon identity, unique global prefixes, automatic directory translations, and WordPress 7.1 compatibility.
* Dashboard widget with active and pinned notes.
* Notes linked to posts and pages via editor meta box.
* Global notes (administrators) and private notes (per-user).
* Full CRUD: create, edit, delete.
* Quick actions: pin/unpin, complete/reopen, archive/restore.
* Search notes by title and content.
* Filter by status: All, Active, Completed, Archived, Pinned, Global, Private.
* Paginated list (20 notes per page).
* No external dependencies or data transmission.
