=== NoteLnk Bridge ===
Contributors: islandsundesign
Tags: website review, feedback, client review, annotations, staging
Requires at least: 5.7
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects a WordPress site to NoteLnk website reviews: pins that stick to page elements, page tracking, exact heights and scroll sync.

== Description ==

[NoteLnk](https://notelnk.com) lets you and your clients pin feedback right on a website preview. This plugin adds the NoteLnk bridge to your site, so in NoteLnk:

* Pins attach to page elements (headings, buttons, images, cards) and follow them when the layout changes.
* The address bar follows reviewers as they click from page to page, and each page is added to the project.
* Page heights are exact and scrolling stays in sync with the pins.
* Optional: verify that you own the site — paste the code from NoteLnk and the project shows a “Verified site” badge.

The bridge loads **only** when the site is shown inside the NoteLnk preview. Regular visitors download nothing.

The plugin can also let NoteLnk show the site in its preview when a security plugin sends `X-Frame-Options: SAMEORIGIN`: it removes that header and allows framing by the site itself and NoteLnk only (`Content-Security-Policy: frame-ancestors`).

Deactivate the plugin when the site launches. An admin-bar badge ("NoteLnk on") reminds you while it is active.

== Installation ==

1. Plugins → Add New → Upload Plugin, choose `notelnk-bridge-1.0.1.zip`, then Install and Activate.
2. Open your project in NoteLnk. The small dot next to the screen-size buttons turns green when the bridge is connected.
3. Optional: Settings → NoteLnk Bridge to change the NoteLnk address, load the bridge from this site instead (for strict Content-Security-Policies), or turn off the framing fix.
4. If you use a page cache, clear it after activating.

== Frequently Asked Questions ==

= Does this slow my site down? =
No. A few bytes of inline script check whether the page is inside a frame; only then is the bridge downloaded.

= The NoteLnk preview still won't load =
Your web server (not WordPress) may be sending `X-Frame-Options` or a `frame-ancestors` policy. Those can't be changed from a plugin; ask your host to allow framing by notelnk.com on the staging site.

= What does the bridge send to NoteLnk? =
Only to the NoteLnk address in the settings, and only while the page is open in NoteLnk: the page address and title, its height and scroll position, the position, tag and opening text of the elements notes are pinned to, and — when someone saves a note — the messages of recent script errors on that page (never page content).

== Changelog ==

= 1.1.0 =
* Site verification code setting: prints a `notelnk-site-verification` meta tag so NoteLnk can verify site ownership.
* Bundled bridge updated: reports recent page errors with new notes, for NoteLnk 3.22+.

= 1.0.1 =
* Bundled bridge updated for the NoteLnk preview server (reports the real page address when NoteLnk shows a page through notelnkcdn.com). Nothing else changed.

= 1.0.0 =
* First release: bridge loader (from NoteLnk or bundled), framing fix for X-Frame-Options, settings page, admin-bar reminder.
