=== Dalmatian Dream Post Views ===
Contributors: whitedd
Tags: post views, views, analytics, counter
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 2.9.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight post view counting for WordPress posts using a custom database table and client-side cache-friendly REST counting.

== Description ==

Dalmatian Dream Post Views counts published post views for guests while preserving compatibility with full-page cache systems. It stores counts in the existing `dd_post_views` table, uses localStorage for a lightweight visitor cooldown, and avoids per-visitor transient records.

Logged-in users are not counted. A simple User-Agent bot filter is used for noise reduction. The plugin does not use external services and does not send view data to third parties.

== Installation ==

1. Upload the `dalmatian-dream-post-views` folder to the `/wp-content/plugins/` directory, or install the plugin ZIP through the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. View counts appear in the Posts list and in the post editor metabox.

== Frequently Asked Questions ==

= Does this reset existing view counts? =

No. Version 2.9.1 keeps using the existing `{$wpdb->prefix}dd_post_views` table with the same `id` and `count` columns.

= Are logged-in users counted? =

No. Logged-in users are intentionally ignored.

= Does this work with page cache plugins? =

Yes. Views are counted with a client-side REST request after the page loads, so cached post pages can still trigger view counting.

= Does the plugin store personal data or use cookies? =

The plugin does not set cookies and does not store IP addresses or other visitor identifiers in WordPress. It uses the visitor's browser localStorage only to remember the timestamp of a view for each post during the cooldown period.

= Does the plugin use XML-RPC or expose a REST API endpoint? =

The plugin does not register XML-RPC methods. Guest view counting uses a public REST endpoint that accepts only a valid published post ID and performs a minimal atomic database increment.

== Changelog ==

= 2.9.1 =
* Removed the unsupported `Tested up to` header from the main plugin PHP file.
* Replaced short internal `dd` identifiers with a unique `ddpostviews` prefix to reduce conflicts with other plugins and themes.
* Preserved the existing `{$wpdb->prefix}dd_post_views` database table and all historical view counts.
* Kept the public cache-friendly REST counting behavior unchanged.

= 2.9.0 =
* Replaced frontend admin-ajax view tracking with a lightweight REST endpoint.
* Preserved existing view data and database schema.
* Retained client-side localStorage cooldown to avoid duplicate requests.
* Reduced WordPress request overhead for frontend view tracking.

= 2.8.2 =
* Changed source-language interface strings to English for WordPress.org internationalization.
* Updated custom-table queries to use the WordPress identifier placeholder supported by the declared minimum WordPress version.
* Expanded privacy, XML-RPC, REST API, and external-service documentation.
* Preserved the existing database table and all historical view counts.

= 2.8.1 =
* Preserved WordPress 5.8 compatibility while documenting unavoidable custom table SQL identifier checks.
* Kept the existing `dd_post_views` table and all historical view counts unchanged.

= 2.8.0 =
* Fixed the 30-minute visitor cooldown calculation.
* Optimized view counting to avoid an unnecessary database read.
* Improved WordPress security and sanitization compliance.
* Added internationalization support.
* Updated branding to Dalmatian Dream Post Views.
* Improved WordPress.org and Plugin Check compatibility.
* Removed development backup files from the release package.
* Preserved all existing historical view counts.
