=== LanternHQ Bug Reporter ===
Contributors:      lanternhq
Tags:              widget, embed, live chat, support, customer support
Requires at least: 5.9
Tested up to:      7.0
Requires PHP:      7.4
Stable tag:        1.0.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Embed the LanternHQ bug reporting widget on your WordPress site with a single embed key.

== Description ==

LanternHQ Bug Reporter is a lightweight plugin that makes it effortless to add the [Lantern](https://lanternhq.app) bug reporting widget to any WordPress site. No code editing required — simply paste your embed key from the Lantern dashboard, save, and the widget is live for every visitor.

**How it works**

1. Install and activate the plugin.
2. Go to **Settings → Lantern** in your WordPress admin.
3. Paste your embed key and click **Save Embed Key**.
4. The Lantern widget is now active on every public page of your site.

**What gets added to your site**

The plugin loads a single, lightweight script from `https://lanternhq.app/api/widget/script` on every public page. Your embed key is passed to the script to identify your Lantern workspace. No server-side requests are made — the script is fetched entirely by the visitor's browser.

**Features**

* One-field setup — just your embed key.
* Zero impact on page load — deferred script injection.
* Clean uninstall — removing the plugin stops all widget output immediately.
* No external requests from the server; the script is loaded entirely by the visitor's browser.

== Installation ==

**From the WordPress plugin directory (recommended)**

1. In your WordPress admin, go to **Plugins → Add New**.
2. Search for **LanternHQ Bug Reporter**.
3. Click **Install Now**, then **Activate**.
4. Go to **Settings → LanternHQ Bug Reporter**, paste your embed key, and click **Save Embed Key**.

**Manual installation**

1. Download the plugin zip file.
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**.
3. Choose the zip file and click **Install Now**, then **Activate**.
4. Go to **Settings → LanternHQ Bug Reporter**, paste your embed key, and click **Save Embed Key**.

**Via FTP**

1. Unzip the plugin and upload the `lantern` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Settings → LanternHQ Bug Reporter**, paste your embed key, and click **Save Embed Key**.

== Frequently Asked Questions ==

= Where do I find my embed key? =

Log in to your Lantern dashboard at [lanternhq.app](https://lanternhq.app), open your project, and go to **Project Settings**. Your embed key is displayed there and starts with `ltrn_`.

= Will the widget slow down my site? =

No. The widget script is injected with the `defer` attribute, meaning the browser only fetches and runs it after your page has fully parsed. It will not block rendering or affect your Core Web Vitals score.

= Can I disable the widget on specific pages? =

Not in the current version. The script is injected globally on all public-facing pages. Per-page control is planned for a future release.

= What happens if I deactivate the plugin? =

Deactivating the plugin immediately stops the script from being injected. Your embed key is preserved in the database so it will be restored if you reactivate. To remove the stored key entirely, delete the plugin.

= Is the plugin compatible with caching plugins? =

Yes. The script tag is injected at runtime via `wp_head`, so it will be present in any cached page HTML that includes the full `<head>` section.

= Does the plugin work with page builders like Elementor or Divi? =

Yes. Because the widget is injected into `wp_head` at the theme level, it works with any page builder or theme that uses a standard WordPress `<head>`.

== External Services ==

This plugin connects to the Lantern bug tracking service (lanternhq.app) to enable the bug reporting widget.

When the plugin is active, it loads a JavaScript file from https://lanternhq.app/api/widget/script on all frontend pages. The embed key configured in the plugin settings is passed to this script to identify your Lantern workspace. Bug reports submitted by users are sent to the Lantern API.

- Service: Lantern (lanternhq.app)
- Data sent: embed key on page load; bug report data (title, description, browser, device) on submission
- Terms of Service: https://lanternhq.app/terms
- Privacy Policy: https://lanternhq.app/privacy

== Changelog ==

= 1.0.0 — 2025-05-24 =
* Initial release.
* Settings page added under **Settings → LanternHQ Bug Reporter**.
* Embed key stored securely in `wp_options` via the WordPress Settings API.
* Widget script injected into `wp_head` on all public-facing pages when an embed key is present.

== Upgrade Notice ==

= 1.0.0 =
Initial release — no upgrade steps required.
