=== Pheme Sticky Notes ===
Contributors: markusstiewe
Tags: dashboard, sticky note, widget, notiz, dashboard widget
Donate link: https://woocon.de/
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Square sticky notes on the WordPress dashboard with color selection, text formatting, and auto-save.

== Description ==

Pheme Sticky Notes adds any number of square sticky notes to the WordPress dashboard. Each note can be edited directly, saves automatically, and can be individually colored.

**Features:**

* Square sticky notes on the WordPress dashboard
* Directly editable text area with automatic saving (800 ms debounce)
* Editable heading (top center)
* "+" button (top right) creates a new note
* Hamburger menu (top left) with formatting and color functions
* Text formatting: **Bold**, *Italic*, Underline, Strikethrough, List, remove formatting
* 5 colors: Yellow #ffd768, Green #00ff9d, Pink #c958ea, Blue #5bd1f5, Red #f85f36
* Custom color picker for individual colors
* Delete icon (bottom right): with multiple notes, the current one is deleted; with the last remaining note, only its content is cleared
* Graphic: dog-ear effect on the lower corners with shadow for a realistic paper look
* Notes are stored per user (WordPress user meta)
* WLP license protection integrated

== Installation ==

1. Upload the `pheme-sticky-notes` plugin directory to `/wp-content/plugins/`.
2. Activate the plugin via the "Plugins" menu.
3. The sticky notes dashboard widget appears automatically under "WordPress Dashboard".
4. Optional: enter your license key on the plugin's license page.

== Frequently Asked Questions ==

= How do I create a new note? =
Use the "+" button in the top right of an existing note to create a new note.

= Do I need to save manually? =
No, changes to the title, content, or color are saved automatically 800 ms after the last input. A small "✓" confirms the save.

= Can different users have different notes? =
Yes, notes are stored per WordPress user. Each user has their own notes.

= What happens if I delete the last note? =
If only one note remains, only its content (title and text) is cleared. The note itself stays on the dashboard.

= Can I use custom colors? =
Yes, in addition to the 5 standard colors, the hamburger menu offers a color picker for any color.

== Screenshots ==

1. Multiple Gelbe Zettel notes on the WordPress dashboard
2. Hamburger menu with formatting and color options
3. Notes with different colors and content

== Changelog ==

= 1.0.7 =
* Changed: the settings page (and its license field) now use the plugin's own "gz_manage" capability instead of the shared WordPress "manage_options" capability. This lets role/menu-management plugins (e.g. Argus Content Access by Role) grant a non-admin role access to Pheme Sticky Notes specifically, without also unlocking Settings, Tools, or other areas that happen to share "manage_options". Existing Administrator access is preserved automatically via a one-time migration on plugin load/activation.
* Bugfix: bundled WLP license client — once a trial expired (or a license became invalid) without a key entered, the plugin's own admin menu disappeared entirely and the only way back to the license field was a dismissible admin notice link; a real, always-visible admin menu item ("… — Lizenz benötigt") now appears automatically whenever the plugin is blocked, so the license key stays reachable by simply browsing the admin menu. Also fixed: the notice's direct link to the (hidden, non-blocked-state) license page could itself land on "Sorry, you are not allowed to access this page." on some WordPress versions — it's now registered as a real top-level page that's immediately hidden again, instead of a page with an empty parent slug.
* Bugfix: removed a UTF-8 byte-order-mark (BOM) at the start of includes/class-gz-core.php and includes/class-gz-widget.php. The BOM was output before any WordPress header() call, breaking "headers already sent" on every request — including REST API and admin-ajax responses from *other* plugins on the same site (e.g. corrupted AJAX/REST data in Lailaps Traffic Insight while Pheme Sticky Notes was active).
* Bugfix: bundled WLP license client no longer enqueues admin/js/wlp-admin.js a second time under its own script handle — on sites also running the WLP License Manager server plugin (e.g. woocon.de), this caused every delegated click handler in that file to register twice, silently toggling UI state on and back off on click
* WLP client updated: support for a dismissible self-promotion banner (configurable per product in the WLP admin, reappears after x days)
* Settings page under Settings → Gelber Zettel with a license input field (WLP)
* Code quality: bundled WLP license client — output escaping applied at the point of echo, heredoc syntax replaced with string concatenation, missing translator comments added for WordPress Plugin Check compliance

= 1.0.5 =
* Hamburger menu: pin button (✦) in the bottom right pins the menu open (prevents automatic closing); icon lights up red when active

= 1.0.4 =
* Formatting: undo button (↩) in the hamburger menu (second row)
* Formatting: indent button (⇥) inserts a fixed tab stop (18 px); the Tab key in the text field works the same way (in lists: indent/outdent with Shift+Tab)
* Formatting: font size A− / A+ changes the size of the selected text by 1 point at a time

= 1.0.3 =
* Pressing Enter after a checkbox automatically inserts a new checkbox on the next line
* Pressing Enter in a list item automatically inserts another list item (native browser behavior)
* Bullet point (•) is now displayed correctly when inserting a list item
* Number of open tasks (empty checkboxes) is now reliably shown as a badge in the widget title

= 1.0.2 =
* Floating note overlay feature: pin button (⊞) pins any note as a fixed overlay across the entire WP backend
* Overlay remains visible across pages (sessionStorage persistence after page navigation)
* Overlay can be moved by dragging its title bar (jQuery UI Draggable)
* Close button (✕) in the overlay ends the floating view
* Plugin scripts and styles are now loaded on all admin pages (not just the dashboard)

= 1.0.1 =
* Widget title bar now automatically syncs with the typed heading
* Manual text color as an additional option in the hamburger menu (color picker + auto-reset)
* Task list button (☑) in the formatting menu: insert checkbox, check it off with a click
* Number of open tasks is shown as a badge in the widget title
* Hamburger menu closes when clicking outside of it

= 1.0.0 =
* Initial release
* Entire widget area, including the title bar, colored in the note color
* Each new note appears as its own dashboard widget
* Automatic text/icon contrast adjustment for dark background colors (WCAG luminance)
* Square sticky notes on the dashboard
* Color selection (5 colors + color picker)
* Text formatting (B/I/U/S/List)
* Auto-save, add & delete
* WLP license protection integrated

== Upgrade Notice ==

= 1.0.2 =
New feature: pin notes as a floating overlay across the entire WP backend.

= 1.0.0 =
Initial installation – no upgrade required.
