=== Save & Summarize – AI Digest for Saved Articles ===
Contributors: ashish112
Tags: bookmarks, reading list, digest, ai, summary
Requires at least: 5.2
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let users save posts for later and get a weekly digest — with optional AI-generated summaries.

== Description ==

**Save & Summarize** helps your readers stay engaged with your content. Users can save articles with one click and later receive a **personalized weekly digest** of their saved posts.  

If the site admin connects an AI provider (OpenAI or compatible API), the digest can optionally include **AI-generated summaries** of saved posts — completely optional and triggered only when configured.

This plugin is fully usable **without AI**, and all AI features require explicit configuration by the site administrator.

### ✨ Features

- 🔖 **Save posts for later** (bookmark button on each post)
- 🗂 **“My Saved Posts” page** (via shortcode)
- 📬 **Weekly email digest** of saved articles
- 🤖 **Optional AI-powered summaries** (admin must enter their own API key)
- 🧩 Works with any theme
- 🔐 Privacy-friendly (no data collected by us; AI calls only with admin consent)
- 🪶 Lightweight and clean code

### 💡 Perfect for
Blogs • News sites • Education sites • Documentation • Tutorial platforms • Content-heavy sites that want higher user retention.

---

== How It Works ==

1. On any Page or Post, enable the option **“Allow users to save this page”** using the checkbox in the editor sidebar.  
   This automatically displays the Save for Later button for that content.

2. (Optional) You can also manually insert the Save button anywhere using the shortcode:
   [saveamsu_save_button]

3. Create a **My Saved Articles** page and insert the shortcode:
   [saveamsu_saved_posts]

4. Enable the weekly digest email in:
   **Settings → Save & Summarize**

5. (Optional) Enter an AI API key to include AI-generated summaries in user digests.

AI features remain disabled unless the admin explicitly adds an API key.

---

== AI Usage & Privacy ==

This plugin includes optional AI features.

- The plugin works **fully without AI**.
- AI is used **only** if the website administrator manually enters and stores their own API key.
- Only **public post content** is sent to the AI provider for the purpose of generating summaries.
- No personal user data (email, name, preferences, IP) is ever sent to any AI service.
- The plugin developers do **not** store or transmit any data.

Admins are responsible for choosing a compliant AI provider and understanding their data policies.

== External services ==

- **OpenAI Chat Completions API** — used to generate optional summaries for saved posts.  
  - **Data sent:** public post content and a system prompt, only when generating a summary (e.g., when the weekly digest is being built). No user-identifying data is sent.  
  - **When it is used:** only after the site administrator enters their own API key in the plugin settings; the plugin functions without this.  
  - **Provider policies:** [Terms of Use](https://openai.com/policies/terms-of-use), [Privacy Policy](https://openai.com/policies/privacy-policy).

---

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/save-summarize-ai-digest-for-saved-articles/` or install via Plugins → Add New.
2. Activate the plugin.
3. Go to **Settings → Save & Summarize**:
   - Enable the weekly digest
   - (Optional) Enter your AI API key
4. Add shortcodes where needed:
   - `[saveamsu_save_button]` — shows Save for Later button
   - `[saveamsu_saved_posts]` — shows user's saved articles list

---

== Usage ==

## 1. Enabling “Save for Later” on Pages and Posts
Each Page and Post includes a checkbox titled:
**Allow users to save this page**

Turn it on to display the Save button automatically on that content.

## 2. Using the Save Button Shortcode
If you prefer manual placement, insert:
[saveamsu_save_button]

## 3. Creating the Saved Articles Page
Create a new page (e.g., “My Saved Articles”) and add:
[saveamsu_saved_posts]

Logged-in users will see a clean list of all articles they've saved.

## 4. Enabling Weekly Summary Emails
Go to **Settings → Save & Summarize** and:

- Turn on weekly digests  
- Customize the email subject and introduction  
- (Optional) Add an AI key to include smart summaries  

---

== Frequently Asked Questions ==

= Does the plugin require an AI API key? =
**No.** The plugin works 100% without AI.  
AI is only used if the admin chooses to connect it.

= Is this GDPR-friendly? =
Yes.  
No personally identifiable information is sent to AI providers.  
Only public post content is sent *and only when AI is explicitly enabled*.

= Can visitors save posts without logging in? =
Currently this requires a logged-in user. Guest saving is planned for future releases.

= How often are digest emails sent? =
Weekly. Future updates will include daily/monthly and manual digest options.

= Which AI providers are supported? =
Any provider with a **Chat Completions API** compatible with OpenAI format:
- OpenAI
- Others coming soon

= Can I customize the email template? =
Yes — the subject and intro text are customizable in settings.  
Full template override support will be added in future versions.

---

== Screenshots ==

1. Save for Later button on a post
2. Checkbox option on Page edit screen
3. Checkbox option on Post edit screen
4. Create “My Saved Articles” page (shortcode example)
5. My Saved Articles page (saved items list)
6. Weekly digest email example
7. Admin settings with AI options

---

== Changelog ==

= 1.0.0 =
* Initial release
* Save button shortcode
* Saved posts list shortcode
* Weekly digest email
* Optional AI summaries
* Settings panel
* Bookmark table creation
* AJAX bookmark support

---

== Upgrade Notice ==

= 1.0.0 =
Initial stable release.


== Developers ==

Developed by Ashish Kumar   
GitHub: https://github.com/ashishforgive
