=== LocalFeedback | Visual Client Feedback Plugin with Screenshots ===
Contributors: mattenser14
Tags: feedback, annotation, client feedback, comments, staging
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.7.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Visual, in-context feedback for WordPress. Pin, highlight and box annotations stored entirely in your own database.

== Description ==

LocalFeedback is a self-hosted feedback and annotation tool for the build and review phase of a WordPress project. Your team and your clients leave comments directly on the page — a pin on a spot, a highlight on a piece of text, or a box around an area — and every one of them is stored in this site's own database table.

There is no connected hub site, no cross-site sync and no external service. That is the whole point: comments cannot fail to save because a remote dashboard was unreachable.

**Core features**

* Pin, text highlight, box and general comment types
* Threaded replies on any comment
* Best-effort automatic screenshot of the annotated area
* Device type and exact viewport width recorded with every comment
* Status workflow (open / in progress / resolved), priority, tags and category
* Tags picked from a dropdown you control, with an optional "Other…" for one-offs
* Teams, including internal-only visibility, an optional join password, and one-click review links for clients
* Three site modes: development, live client review on chosen pages, and live feedback from anyone that only moderators can read
* A site-wide review link that hides the toolbar from everyone else, so feedback can be gathered on a site that is already public
* Password-protected pages respected: nothing shows until the password is entered
* Per-page control from the editor sidebar, or by listing pages, directories and wildcards in settings
* A screenshot library with the same filters as the feedback list, plus a one-click purge when a project wraps
* Guest commenting by default, or restrict to logged-in WordPress users
* A short welcome popup that shows first-time reviewers how to use the tools
* Optional follow-up emails so commenters hear about replies and status changes, with one-click unsubscribe
* A shareable link for every comment that opens the page and highlights the annotation
* Filterable, sortable admin table with customisable columns and CSV export
* Instant email notifications and an optional daily digest
* Documentation built into the plugin

**Built for reliable saving**

* The comment box never clears until the server confirms the save
* Failed saves retry automatically with a growing delay
* Unsent text is kept in the browser, so a reload does not lose it
* Every save carries a unique key, so a retry can never create a duplicate
* If the REST API is blocked, the same request is retried through admin-ajax.php

== Installation ==

Requires WordPress 6.2 or newer.

1. Upload the `localfeedback` folder to `/wp-content/plugins/`, or install the ZIP through Plugins → Add New.
2. Activate the plugin.
3. Visit LocalFeedback → Settings to choose who can leave feedback.
4. Open any page on the front end and use the Feedback button in the bottom right corner.

== Frequently Asked Questions ==

= Does any data leave my site? =

No. Feedback, screenshots and settings are stored in this WordPress installation. The only outbound messages are the notification emails you switch on, sent through your own server. The "Ideas & bug reports" menu item simply opens a form in your browser; the plugin itself sends nothing.

= Can people leave feedback without a WordPress account? =

Yes, that is the default. You can require a WordPress login instead in Settings.

= Where are screenshots stored? =

In wp-content/uploads/localfeedback, with random filenames, deliberately outside your media library so review captures never mix in with your real content. Capture happens entirely in the visitor's browser and is best effort — cross-origin images, embedded media and strict content security policies can prevent it. The comment is always saved either way. LocalFeedback → Screenshots shows everything stored and can delete it all in one go.

= Can I share a screenshot outside WordPress? =

Yes. Every screenshot has a direct URL with a long random filename, so you can paste one into a task in Asana, Teamwork, Slack or anywhere else and it will load for whoever opens it. The flip side is that the link is the only thing protecting the image: it is never shown to anyone who cannot already read the comment, and the filename cannot realistically be guessed, but a link you paste somewhere public is viewable by anyone who has it.

= Can I use this on a live site without visitors seeing it? =

Yes, and there are three ways to keep it contained. Set the site mode to "Live site for client review" and the toolbar appears only on pages you have listed or ticked in the page editor. Protect those pages with a WordPress page password and the toolbar waits until the password is entered. Or set "Who can leave feedback" to "Only people with the review link" and it stays hidden from everyone who has not opened the link. They combine freely.

= Can visitors on my live site send feedback without seeing each other's? =

Yes. Set the site mode to "Live site for anyone to comment". Visitors can leave feedback on any page, but only moderators can read it. Each visitor still sees the comment they just sent, so they can correct it during the edit window.

= What happens on password-protected pages? =

The toolbar and the page's feedback stay hidden until the page password has been entered, the same as the content. The feedback is protected on the server as well, not just hidden. A link to one comment still works: it opens that comment once the password is in. You can turn this off in Settings.

= Notification emails are not arriving. What can I do? =

The plugin sends email through WordPress, which uses your server's own mail system. Many hosts deliver that mail badly or not at all. Install an SMTP plugin and connect it to a proper email service; that fixes delivery for the whole site.

= How do I turn feedback on for just one page? =

Edit the page and tick "Allow feedback on this page" in the Feedback box in the sidebar. That writes to the same "Limit to these pages" list the settings screen shows, so there is only ever one list to reason about — changing either place changes both. The checkbox appears once a page is published, because until then it has no final address to record.

= Does it work with Elementor, Divi and other page builders? =

Yes. The toolbar appears on the finished page, where reviewers see it, and stays out of the builder's own editing screen so it never sits on top of the design you are working on. To switch feedback on or off for a page, view it on the front end while signed in and use the Feedback item in the admin bar. That works the same with every builder. The "Allow feedback on this page" checkbox on the WordPress edit screen does the same job.

= Does it work with caching plugins? =

Yes. The front end fetches its session and security token at runtime rather than reading them from the cached HTML.

= What happens when I delete the plugin? =

Nothing is removed unless you tick "Delete all feedback…" in Settings first. Otherwise your data stays in place.

== Screenshots ==

1. Reviewers annotate the page itself. Pins, highlighted text and boxes all appear in place, and every comment is listed in the panel alongside them.
2. Four ways to comment: drop a numbered pin, highlight wording, draw a box around an area, or leave a general note about the page.
3. Each comment can carry a tag, a priority, a team, and an internal-only flag that hides it from clients and guests.
4. Threaded replies, a status you can change without leaving the page, and a link that points back to this exact annotation.
5. A short welcome popup explains the tools the first time someone visits, and can be reopened at any time.
6. The feedback list, with unresolved counts across the top, filters for every field, and CSV export.
7. One comment in full: its captured screenshot, its replies, the triage fields, and the page, device and viewport it came from.
8. The screenshot library, filtered exactly like the feedback list and stored outside your media library.
9. Any capture opens full size with its comment and a link through to the full feedback record.
10. Teams decide who sees what, including internal-only visibility and an optional join password for clients.
11. Choose who may leave feedback, and limit the toolbar to particular pages, directories or URL patterns.
12. Screenshot capture and compression, the tag dropdown people choose from, and the highlight starter template.
13. Instant emails, an optional daily digest, and follow-ups so commenters hear about replies and status changes.

== Changelog ==

= 1.7.1 =
* Added: three site modes. "Development site" is the tool as before. "Live site for client review" shows the toolbar only on the pages you choose, for client sign-off on a site that is already public. "Live site for anyone to comment" lets visitors leave feedback anywhere but shows it only to moderators.
* Added: a site-wide review link. Set "Who can leave feedback" to "Only people with the review link" and the toolbar is hidden from everyone else. Opening the link remembers that browser for 30 days, and generating a new link cuts off everyone using the old one. Team review links keep working alongside it.
* Added: an "Allow feedback on this page" checkbox in the page editor. It writes to the same "Limit to these pages" list as Settings rather than keeping a second copy, so the two cannot disagree. An entry follows its page if the slug changes, and is removed when the page is trashed.
* Added: password-protected pages are respected. The toolbar and the page's feedback stay hidden until the password is entered, and the server refuses a protected page's feedback to anyone who has not entered it. Links to a single comment survive the password form. On by default; can be switched off.
* Added: a Feedback item in the admin bar on the front end, for sites built with Elementor, Divi or any other page builder, whose editors never show the page checkbox. It says whether feedback is on for the page you are viewing and switches it in one click, writing to the same list.
* Added: rules ending in $ match one exact page instead of acting as a prefix, so "/about$" no longer also covers "/about-us".
* Changed: "Send an idea" is now "Ideas & bug reports" and opens a hosted form in a new tab, so reports arrive even from sites that cannot send email. The plugin author address setting is gone.
* Changed: switching site mode no longer quietly changes the guest-reading setting. Each mode now enforces its own reading rules.
* Changed: notes on email delivery and SMTP in Settings and the documentation.
* Fixed: the feedback button and panel appeared inside page builders' editing canvases — Elementor, Divi, Beaver Builder, Bricks, Oxygen, Breakdance, WPBakery, Brizy and Thrive Architect — sitting on top of the design being edited. They now stay out of the builder and appear only on the real page.
* Fixed: on a site where visitors could comment but not read, the Edit and Delete buttons on a visitor's own new comment were refused by the server. Everyone can now read, and within the edit window change or withdraw, what they wrote themselves.
* Fixed: saving a page from the editor re-applied the Feedback checkbox as it looked when the editor opened, which could quietly undo a change made in Settings in the meantime. The box now only changes the list when you actually tick or untick it.
* Fixed: page addresses containing non-English characters, such as /café/, lost those characters when listed, so the rule never matched the page.
* Fixed: saving the settings screen showed no "Settings saved" confirmation, and generating a new review link showed no notice.

= 1.5.2 =
* Fixed: following a link to a comment further down a page did not scroll to it. Smooth scrolling is silently ignored by some themes and whenever the reader has asked for reduced motion, so the plugin now confirms the page actually moved and jumps directly if it did not.

Earlier entries are in changelog.txt, which ships with the plugin.

== Upgrade Notice ==

= 1.7.1 =
Adds three site modes, a review link for public sites, a per-page checkbox in the editor, and respect for password-protected pages. Existing development and live sites behave exactly as before.

= 1.5.2 =
Fixes scrolling to a comment when following its link.

= 1.4.0 =
Security release. Fixes an access-control flaw where an internal team left without a password could be unlocked by any visitor. Update immediately.

== License ==

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
