=== LazyLink ===
Contributors: ruudm
Tags: affiliate links, thirsty affiliates alternative, link cloaking, click tracking, redirect
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The lazy way to manage affiliate links — cloak, track, and organize without the bloat. Import from ThirstyAffiliates in one click.

== Description ==

LazyLink is a lightweight affiliate link manager and click tracker for WordPress. No heavy framework, no third-party dashboard, no click-tracking table that quietly grows into the millions of rows. Your links and your click data stay in your own database.

**Free forever core** — cloaking, redirects, categories, stats, and import are all in the free plugin. No link cap.

**Built for affiliate marketers and bloggers**

* **Cloaked or direct links** — choose per link (`/go/your-slug/` cloaked redirects, or plain direct links when a program requires them, e.g. Amazon Associates)
* **Real per-link stats** — last 7 days, last 30 days, and all-time click counts at a glance, no digging through a generic report screen
* **Configurable redirects** — 301 or 302, custom `/go/` prefix, optional admin-click exclusion

**Fast to work with**

* `[lazylink slug="..."]` shortcode, plus an "Insert Affiliate Link" block-editor tool to search or quick-add a link without leaving your post
* **Optional keyboard shortcut** to open the insert tool while writing — off by default, and offered as a short list of safe combos so it never collides with Bold/Italic/Link or your browser's own shortcuts
* **Categories** with their own default link type, so bulk-adding links from one program is quick
* **Unlimited links, always free** — no artificial cap on how many links you can manage

**Switching from another plugin?** Bring your links across with the built-in import tool — see the FAQ for supported sources.

**Built to stay light**

* Vanilla PHP and core WordPress APIs only — no JS frameworks, no build step, no phoning home to a third-party service
* Every query uses `$wpdb` prepared statements; nonces and capability checks on every admin action

= Why LazyLink =

LazyLink is built and used daily on a real affiliate site — not a feature checklist assembled to compete on paper. If you've outgrown a bloated link plugin, don't want to pay premium pricing, or just want fewer moving parts, that's exactly what this is for.

== Installation ==

1. Upload the `lazylink` folder to `/wp-content/plugins/`, or install through the **Plugins** screen directly.
2. Activate the plugin through the **Plugins** screen.
3. Go to **LazyLink** in the admin menu to add your first link.
4. If links 404 after activation, go to **Settings → Permalinks** and click **Save Changes** to regenerate rewrite rules.

Switching from another plugin? Use **LazyLink → Import** to bring your links across — see the FAQ for details.

== Frequently Asked Questions ==

= How is LazyLink different from other link managers? =

LazyLink is built to be smaller and simpler: no bundled frameworks, no bloated click-tracking table, and stats that actually tell you how a specific link is performing without extra clicks. Links are always unlimited, even on the free version.

= Can I import my links from ThirstyAffiliates? =

Yes — go to **LazyLink → Import** and select ThirstyAffiliates as the source. Your links, categories, and redirect settings are brought across automatically.

= How do I add a link to a post? =

Use the shortcode `[lazylink slug="your-slug"]`, or the "Insert Affiliate Link" tool in the block editor's text toolbar.

= Can I use a keyboard shortcut to insert a link? =

Yes — turn one on under **LazyLink → Settings**. It's off by default, and you pick from a short list of safe combos rather than typing your own, so it can't collide with Bold/Italic/Link or a shortcut your browser already owns.

= Can I change the `/go/` prefix? =

Yes — set it under **LazyLink → Settings**.

= Does this track my own clicks when I'm logged in as admin? =

Not by default — admin clicks are excluded from tracking. This is configurable under **LazyLink → Settings**.

= Is there a link limit? =

No — LazyLink supports unlimited links on the free version.

= Does LazyLink slow down my site? =

No third-party requests, no external tracking calls, and no heavy dependencies — redirects and click logging run on plain WordPress APIs. `/go/` links are also matched and redirected as early as possible in the WordPress request lifecycle, before other plugins and your theme finish loading, so a click doesn't wait on the rest of the site to boot.

= Where can I get support? =

Please use the [support forum](https://wordpress.org/support/plugin/lazylink/) here on WordPress.org.

== Screenshots ==

1. Links tab — add and manage links at a glance
2. Add/edit a link — cloak or direct, category, redirect type
3. Stats tab — 7-day, 30-day, and all-time clicks per link
4. Block editor — the "Insert Affiliate Link" tool, search or add a link without leaving your post
5. Settings — prefix, redirect type, admin-click exclusion

== Changelog ==

= 2.4.0 =
* New: "Insert Affiliate Link" block-editor tool (renamed from "LazyLink Link" for clarity) — refreshed icon in both the admin menu and the editor toolbar.
* New: optional keyboard shortcut to open the insert tool while writing, configurable under Settings from a short list of safe combos.
* Improved: the insert-link dialog is now a properly sized window instead of a cramped popover, so the search results and "Add new" form both have room to breathe.
* Improved: `/go/` redirects now resolve earlier in the request, before other active plugins and the theme finish loading — noticeably faster on sites running more than a couple of plugins.

= 2.3.0 =
* New: one-click import from ThirstyAffiliates — links, categories, and redirect settings are brought across automatically.
* New: link categories, each with their own default link type (cloaked or direct), so bulk-adding links from one affiliate program is fast.

= 2.2.0 =
* New: redesigned Stats tab — 7-day, 30-day, and all-time counts per link, plus a site-wide totals summary.
* New: daily click aggregates stored separately from the raw click log, so stats stay fast to load as click history grows.
* New: configurable click-data retention window, with a manual "run cleanup now" option.

= 2.1.0 =
* New: block-editor tool to search existing links or quick-add a new one without leaving the post you're writing.
* New: per-link direct vs. cloaked redirect option, for programs that require an uncloaked link (e.g. Amazon Associates).

= 2.0.0 =
* New: redesigned two-tab admin (Links, Stats).
* New: redirect type toggle (301 or 302).
* New: configurable `/go/` prefix.
* New: option to exclude logged-in admin clicks from tracking (on by default).