=== Download Radar ===
Contributors: tharkun69
Tags: download, tracking, statistics, redirect, export
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.2.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight download tracker for WordPress with stable download URLs, statistics, charts, version tracking, and CSV/Excel export.

== Description ==

Download Radar manages download targets in the WordPress administration area and provides stable public tracking URLs.

Example:

/download/markupdesk/

When the URL is requested, the plugin records a download event and then redirects the visitor to the configured file using HTTP 302.

Stored event data:
* Download ID
* Version at the time of the request
* Timestamp
* Referrer, if supplied by the browser
* User-Agent

IP addresses are not stored.

Version 0.2.4 improves WordPress.org review compatibility for the SpreadsheetML export. Version 0.2.3 renamed the plugin to Download Radar while preserving existing data and the legacy shortcode.

== Installation ==

1. In WordPress, open Plugins > Add Plugin > Upload Plugin and select the ZIP file.
2. Activate the plugin or update the existing installation.
3. Create a download under Download Radar.
4. Enter the title, version, target URL, and active status.
5. Use the generated shortcode or tracking URL on the website.
6. Open Download Radar > Statistics to review the download data.

Pretty permalinks must be enabled for the public tracking URLs.

== Shortcode ==

[download_radar id="markupdesk"]

Optional button text:

[download_radar id="markupdesk" text="Download MarkupDesk"]

Custom CSS class:

[download_radar id="markupdesk" text="Download" class="et_pb_button et_pb_button_0"]

The previous `[download_tracker]` shortcode remains supported for existing content.

== Upgrade Notice ==

= 0.2.4 =
Improves Plugin Check compatibility for the Excel-compatible export. No database migration is required.

= 0.2.1 =
Adds a compact Download Radar widget to the WordPress Dashboard. No database migration is required.

= 0.2.0 =
The event table is automatically extended with a version snapshot. Events created with version 0.1.0 are displayed as "Historical / unknown" because their original version cannot be reconstructed reliably.

== Changelog ==

= 0.2.4 =
* Removed optional SpreadsheetML header styling that Plugin Check mistook for enqueued CSS.
* Kept both export worksheets and all exported data unchanged.
* Renamed the public plugin identity to Download Radar.
* Added the `[download_radar]` shortcode while retaining `[download_tracker]` for compatibility.

= 0.2.1 =
* Added a WordPress Dashboard widget.
* Shows the top 10 downloads with title and total download count.
* Download titles link directly to the edit screen.
* Added quick links to all downloads and the detailed statistics page.

= 0.2.0 =
* Added statistics dashboard.
* Added 30, 90, and 365 day filters.
* Added filtering by download/product.
* Added SVG trend chart without external libraries.
* Added product comparison chart.
* Added per-version statistics.
* Added version snapshot for every download event.
* Added CSV export.
* Added Excel-compatible SpreadsheetML export with Downloads and Versions worksheets.
* Preserved existing 0.1.0 event data.
* Improved Plugin Check compliance, nonce verification, prepared SQL, redirects, and readme metadata.

= 0.1.0 =
* Added custom post type for downloads.
* Added version, target URL, and active status.
* Added tracking URL /download/<slug>/.
* Added HTTP 302 redirect.
* Added event table without IP address storage.
* Added statistics for today, 7 days, 30 days, and total.
* Added last-download timestamp.
* Added [download_tracker] shortcode.
