=== AddonLogic Reading Progress Saver ===
Contributors: snehalpancholi
Tags: reading progress, scroll position, resume reading, user experience, bookmarks
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Remembers each visitor's scroll position on long posts and shows a "Resume reading" prompt on their next visit.

== Description ==

AddonLogic Reading Progress Saver tracks how far a visitor has read on any post or page and offers a dismissible "Resume reading" prompt on their next visit — right where they left off.

**Features:**
* Works for all visitors (localStorage) and syncs to the server for logged-in users for cross-device resume
* Configurable minimum scroll percentage before a position is saved
* Dismissible slide-in bar at top or bottom of screen
* Fully customisable prompt text, Continue button label, and Dismiss button label
* Use `{percent}` placeholder in prompt text to show the saved position
* AJAX-backed server sync with nonce protection
* Configurable post types — enable for posts, pages, or any custom post type
* No jQuery, no external dependencies

== Installation ==

1. Upload the `reading-progress-saver` folder to `/wp-content/plugins/`.
2. Activate via **Plugins > Installed Plugins**.
3. Go to **Settings > Reading Progress** to configure post types, minimum scroll %, and prompt text.

== Frequently Asked Questions ==

= Does it work for guests? =
Yes. Scroll positions are saved in `localStorage` for everyone. For logged-in users, positions are additionally synced to the server (can be disabled in settings) enabling cross-device resume.

= Will it show the prompt on every page? =
Only on the post types you select in settings, and only on single post/page views. It will not appear on archive or front-page templates.

= How is data stored for logged-in users? =
The saved percentage is stored as WordPress user meta under the key `addlc_rps_pos_{post_id}`.

= What happens to server data on uninstall? =
All `addlc_rps_pos_*` user meta entries are deleted on plugin uninstall.

== Screenshots ==

1. Resume reading prompt bar at the bottom of the screen.
2. Settings page — post types, minimum scroll %, prompt text customisation.

== Changelog ==

= 1.0.0 =
* Initial release.
