=== Content Freshness Check ===
Contributors: dailypicks
Tags: outdated content, content freshness, review date, last checked, deadline
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Finds deadlines, prices and years inside your posts that have gone out of date, and adds a "checked" date to each table row.

== Description ==

Other reminder plugins only count days since a post was published. Content Freshness Check reads what the post actually says:

* **Deadlines** – dates next to words such as "until", "deadline", "ends", "campaign" or "price change" (written in Japanese: まで・締切・期限・終了・キャンペーン・から値上げ …). Past dates are listed as *Expired*, dates within 30 days as *Ending soon*.
* **Old years** – "2025 edition", "latest (2025)", "as of October 2025" in titles, headings and text, once the year (or fiscal year) has changed.
* **Prices** – sentences with prices (円, ¥, monthly, tax included) in posts that have not been rechecked for 90 days.
* **Checked date per table row** – put `[checked date="2026-10-08"]` in a table cell and readers see a small "Checked 10/8/2026". Rows older than the limit you set are listed.
* **Last checked date per post** – a box on the edit screen with "Checked today" and a review interval (30/60/90/180 days). It is stored separately, so confirming a post does not change its modified date.

Everything appears on **Tools → Content freshness**: counts per kind, the sentence around each match, sorting, filtering, and "Handled" (with a note) to hide a match. A dashboard widget shows the counts and an optional weekly email lists the top 10 posts.

= Reads only =

* The plugin never edits your posts. It stores its results in post meta only.
* No tracking, no ads, no external services (see the ZIP version note below).
* Readers get a ~200-byte stylesheet only on pages that use `[checked]` or the optional "checked on" line. Other pages are not affected.
* Large sites: the daily read processes 50 posts per run and continues from where it stopped.

= Shortcode =

* `[checked date="2026-10-08"]` – shows "Checked 10/8/2026" (Japanese: 確認日 2026/10/8).
* `[checked]` – uses the post's last checked date (so "Checked today" on the edit screen updates every bare `[checked]` in the post), or the modified date when there is none.
* `[dpcf_checked]` – the same, for sites where another plugin already uses `[checked]`.

= Update check (ZIP version only) =

The version downloaded from daily-picks.life checks for updates once a week by reading the latest version number on its product page (https://daily-picks.life/wp-json/wp/v2/pages?slug=content-freshness&_fields=content). Nothing about your site is sent: the request has its own user agent instead of WordPress's default one, which contains your site address. Nothing is installed automatically; you see a notice with a link to the download page. You can turn this off under Tools → Content freshness → Settings. Privacy policy: https://daily-picks.life/content-freshness/privacy/

== Installation ==

1. Upload the plugin and activate it.
2. Open **Tools → Content freshness**. The first read of all posts starts on activation (50 posts per minute in the background).
3. On each post, use the **Content freshness** box to set the last checked date and review interval.

== Frequently Asked Questions ==

= Does it change my posts or their modified date? =

No. It only reads posts. The last checked date, interval and "Handled" notes are post meta.

= Which languages are detected? =

The date, deadline and price patterns are made for Japanese posts (including 令和 years and fiscal years). The interface is in English and Japanese.

= A match is not really out of date. =

Press "Handled" and write a short reason. It stays hidden until you show it again on the Handled tab.

== Changelog ==

= 0.4.0 =
* ZIP version: the weekly update check reads the version number on the product page (no separate file).

= 0.3.0 =
* A start date that has passed ("10月1日から改定", "から適用", "に施行") no longer counts as expired: the change is in force. It is still listed as "Ending soon" before it starts.
* A date without a year followed by a weekday, such as 10月7日(火), uses the year where the weekday matches (quotes from last year are read as last year).
* Text after "is here:" is treated as a link title.
* "条件" and similar words no longer count as statistics (only numbers with 件, and 件数).

= 0.2.0 =
* Far fewer false "Expired" matches: recurring dates (翌年3月15日), things the text says already ended, statistics periods, thresholds (〜までに買った・以降), "as of" dates and links to other posts are no longer deadlines.
* A deadline counts as expired only when it passed after the post was last updated or checked.
* Fixed: 令和9年(2027年)7月31日 was read as this year's July 31.
* Old years: editions and "as of" years count in titles (and headings when two or more years old); claims such as 最新 or 【2025年】 count everywhere.
* Fixed: the list could show the same post on two pages.

= 0.1.0 =
* First test version.
