=== Swapfeed ===
Contributors: mariofajt
Tags: not interested, hide posts, personalized feed, post grid, load more
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Dismiss & Refill: a self-curating post feed with a “Not interested” button. Readers hide posts and the gap refills instantly.

== Description ==

Big platforms let people say "not interested". Your site can too.

Swapfeed shows your posts as a clean card grid. Every card has a **Not for me** button. When a reader clicks it, the card disappears and another post slides into its place — the feed refills itself. After dismissing, the reader can also hide everything from that category with one click, or undo.

We call this pattern **Dismiss & Refill**: a **self-curating feed** that each reader shapes for themselves — the “not interested” / “show less like this” experience of Google Discover and YouTube, on your own WordPress site.

Use it for a personalized post feed, a blog index, a news grid, a portfolio, real estate listings or WooCommerce products.

**Features**

* Shortcode `[swapfeed]` and a **Swapfeed block** for the block editor.
* Works with any theme: inherits your fonts, uses your accent colour.
* Posts, pages or any public custom post type; filter by category or tag.
* Optional category filter buttons above the feed.
* "Hide everything from this category", **Undo** and **Show hidden** built in.
* "Load more" button with infinite scroll after the first click.
* Lightweight: one small script and stylesheet, loaded only where a feed is shown. No jQuery.
* **Private by design**: what a reader hides is stored only in their own browser. No accounts, no tracking cookies.
* **What readers hide** report: anonymous totals per category and the most dismissed posts, so you know what your audience doesn't want (can be switched off).
* Translation ready. Included: English, Spanish, Croatian.

== Installation ==

1. Upload the `swapfeed` folder to `/wp-content/plugins/` or install the zip from Plugins → Add New → Upload.
2. Activate the plugin.
3. Add the **Swapfeed** block to a page, or paste `[swapfeed]` anywhere shortcodes work.
4. Adjust defaults in Settings → Swapfeed.

== Frequently Asked Questions ==

= Where are hidden posts stored? =

In the reader's browser (localStorage). They stay hidden on that device until the reader clicks "Show hidden" or clears site data.

= Does it work with page caching? =

Yes. The page is cached as usual; dismissing and refilling happen in the browser through the WordPress REST API.

= Is the report GDPR friendly? =

The report stores only anonymous daily totals per category and per post. No IP address, cookie or identifier is stored. A salted hash of the IP is kept for one hour only to limit abuse, then it expires.

= Shortcode options? =

`count`, `columns`, `post_type`, `category`, `tag`, `exclude`, `offset`, `filters`, `image`, `excerpt`, `date`, `term`, `allow_term`, `title`. Example: `[swapfeed count="9" columns="3" category="news" filters="yes"]`. Full list in Settings → Swapfeed → How to use.

== Screenshots ==

1. A Swapfeed grid with the "Not for me" button.
2. After dismissing: undo or hide the whole category.
3. The "What readers hide" report.

== Changelog ==

= 1.0.1 =
* New filter `swapfeed_js_config` so multilingual plugins can localise the REST URLs and labels.
* Correct translation files (.mo) for every WordPress version.
* Buttons ignore themes that force uppercase.

= 1.0.0 =
* First release.
