=== AddonLogic Live Visitor Counter ===
Contributors: snehalpancholi
Tags: live visitors, online users, visitor counter, real-time, shortcode
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

Near-real-time online visitor counter using lightweight AJAX pings. Displays count via shortcode or admin bar badge. No cookies, no sessions.

== Description ==

AddonLogic Live Visitor Counter tracks active visitors without cookies or PHP sessions. Each visitor's browser sends a silent ping at a configurable interval; visitors who pinged within the active window are counted as "online." The count is available via the `[lvc_count]` shortcode on the front end and as a badge in the WordPress admin bar.

**Features**

* `[lvc_count]` shortcode with optional label, suffix, and live auto-refresh
* Admin bar badge showing current count (admins only)
* Configurable ping interval (15–300 s) and active window (60–1800 s)
* Privacy-safe: uses anonymised IP + UA hash, no persistent cookies
* Auto-refreshes count in all shortcode instances without page reload
* Settings at **Settings → Live Visitor Counter**

== Installation ==

1. Upload `live-visitor-counter` to `/wp-content/plugins/`.
2. Activate through **Plugins**.
3. Configure at **Settings → Live Visitor Counter**.
4. Add `[lvc_count]` to any post, page, or widget.

== Shortcode ==

`[lvc_count label="" suffix="" live="yes"]`

| Attribute | Default | Description                                        |
|-----------|---------|----------------------------------------------------|
| label     | —       | Optional text shown before the number.             |
| suffix    | —       | Optional text shown after the number.              |
| live      | yes     | yes/no — auto-refresh the count via JS ping.      |

== Changelog ==

= 1.0.0 =
* Initial release.
