=== AddonLogic Download Counter ===
Contributors: snehalpancholi
Tags: download counter, file tracking, analytics, PDF, media
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track how many times visitors download files. Use the [dlc_link] shortcode to wrap any file URL with automatic hit counting.

== Description ==

AddonLogic Download Counter replaces plain `<a download>` links with tracked versions using a simple shortcode. Every click fires an AJAX ping that increments the counter in a dedicated database table. An admin report (Tools → Download Counter) lists all tracked files sorted by download count or most recent hit.

**Features**

* `[dlc_link url="..." label="..."]` shortcode
* Optional inline download count badge (`show_count="yes"`)
* Optional download icon (SVG, no image files)
* Admin report: file, label, count, first/last hit, delete
* No cookies, no external services

== Installation ==

1. Upload `download-counter` to `/wp-content/plugins/`.
2. Activate through **Plugins**.
3. Use `[dlc_link url="https://example.com/file.pdf" label="Download PDF"]` in any post or page.
4. View counts at **Tools → Download Counter**.

== Shortcode ==

`[dlc_link url="" label="" show_count="no" icon="yes" class=""]`

| Attribute    | Default | Description                                  |
|--------------|---------|----------------------------------------------|
| url          | —       | Required. Full URL of the file to download.  |
| label        | —       | Link text. Falls back to the filename.       |
| show_count   | no      | yes/no — display download count badge.       |
| icon         | yes     | yes/no — show download arrow SVG icon.       |
| class        | —       | Extra CSS class on the `<a>` element.        |

== Changelog ==

= 1.0.0 =
* Initial release.
