=== AddonLogic Recently Visited Pages Widget ===
Contributors: snehalpancholi
Tags: recently viewed, browsing history, widget, cookie, personalization
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track the visitor's recently viewed pages with a browser cookie and display them in a widget, shortcode, or template anywhere on the site.

== Description ==

AddonLogic Recently Visited Pages Widget stores the visitor's browsing history entirely in their own browser via a cookie — no database writes, no server load, no privacy concerns beyond standard cookie consent. On each page load a tiny JavaScript tracker records the URL and title. The history list is rendered client-side inside a widget area or anywhere you place the shortcode.

**Features:**

* 100% client-side — zero database queries for tracking.
* Standard WordPress Legacy Widget and `[addlc_recently_visited]` shortcode.
* Configurable maximum items (1–20).
* Configurable cookie lifetime (1–365 days).
* Option to exclude the page the visitor is currently viewing.
* Custom empty-state message.
* Cookie name: `addlc_rvpw_history` (JSON array of {url, title} objects).
* No jQuery; pure ES5-compatible vanilla JavaScript.

== Installation ==

1. Upload `recently-visited-pages-widget` to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to **Settings → Recently Visited** to configure defaults.
4. Add the **AddonLogic: Recently Visited Pages** widget in **Appearance → Widgets**, or paste the shortcode:

```
[addlc_recently_visited title="Your History"]
```

== Changelog ==

= 1.0.0 =
* Initial release.

== FAQ ==

= Does this require server-side user accounts? =
No. History is stored entirely in the visitor's browser cookie. Anonymous visitors are tracked just as well as logged-in users.

= Does this work with caching plugins? =
Yes — the widget/shortcode renders an empty placeholder on the server. JavaScript fills it in after the page loads using the cookie, so full-page caching does not break it.

= Where is the cookie stored? =
In the visitor's browser only, for the domain they are browsing. The cookie is never sent to third parties.

= How do I clear a visitor's history? =
The visitor can clear their browser cookies. There is no admin UI to clear individual histories since nothing is stored server-side.
