=== Forge Stats Counter ===
Contributors: ingotpress
Donate link: https://ingotforge.wordpress.com
Tags: counter, statistics, animation, shortcode, block
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.3.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create reusable responsive statistics counters with animation, server-side API values, modern design controls, import/export, and a dynamic block.

== Description ==

Forge Statistics Counter creates reusable counter instances that can be placed with `[forge_counter]` or the Forge Statistics Counter dynamic block.

Version 2.3.9 confirms WordPress 7.1 compatibility and declares the block iframe-compatible with Block API version 3 where supported, while retaining the version 2 fallback for WordPress 5.6 through 6.2 and preserving existing data and public behavior.

Main features:

* Reusable counter instances with stable IDs and shortcodes.
* Responsive desktop, tablet, and mobile column controls.
* Fixed values or live server-side JSON API values.
* Bearer token, Basic authorization value, custom API-key header, and HMAC-SHA256 modes.
* Optional automatic login-token generation and WP-Cron renewal.
* Persistent transient caching, stale fallback, safe URL validation, timeouts, and response-size limits.
* Classic, bounce, fade, slide, rolling, flip, and typewriter animation treatments.
* Page-load, viewport, click/keyboard, and hover/focus triggers.
* Plain, locale-aware, or compact number formatting.
* Granular container, card, icon, color, border, shadow, spacing, typography, and responsive controls.
* Optional item links and accessible labels.
* Copy one instance, copy selected instances, save as a copy, and duplicate individual items.
* Safe JSON export by default, optional sensitive migration export, and current/legacy import support.
* Searchable, sortable, paginated instance administration.
* Built-in onboarding and reference manual under Forge Counters > Manual.
* Dynamic block using the same server renderer as the shortcode.
* Scoped CSS, conditional asset loading, reduced-motion support, and visible keyboard focus.
* Locally bundled, plugin-scoped Font Awesome Free 6.7.2 plus native WordPress Dashicons.
* No tracking, telemetry, remote accounts, or external runtime asset requests.

The plugin stores counter instances in its own WordPress database table. Existing records without a design preset retain the previous legacy presentation. New instances begin with the modern preset.

== Installation ==

1. Upload the `forge-stat-counter` folder to `/wp-content/plugins/`, or install the ZIP through Plugins > Add New Plugin > Upload Plugin.
2. Activate Forge Statistics Counter.
3. Open Forge Counters > Add New.
4. Add one or more counter items and save the instance.
5. Copy the generated shortcode, for example `[forge_counter id=123]`, or insert the Forge Statistics Counter block.
6. Open Forge Counters > Manual for the complete onboard guide.

== Frequently Asked Questions ==

= Will this update change existing shortcodes or IDs? =

No. The public shortcode remains `[forge_counter id=123]`, and existing records remain in the same custom table. Old instances without a design preset are interpreted as Legacy so their default appearance is not replaced.

= Can a counter use a live API value? =

Yes. Configure an HTTPS JSON endpoint and response path for an item. Requests are made by WordPress on the server. API URLs and credentials are not embedded in public HTML.

= Which response format is supported? =

The configured dotted path can target a numeric value such as `data.total`. If the path is unavailable, the plugin retains the historical `count` and `number` fallbacks.

= Are API credentials encrypted? =

Newly saved API keys and login passwords use authenticated encryption when available, with compatibility for credentials saved by earlier releases. Password fields are blank in the editor and preserve the saved value unless explicitly replaced or cleared.

= Can I move counter instances to another site? =

Yes. Use Forge Counters > Import / Export. Ordinary exports exclude credentials. A sensitive portable export requires an explicit warning checkbox and should be stored securely and deleted after the controlled migration.

= Can I copy an instance? =

Yes. Copy from the list, use the bulk Copy action, or choose Save as copy in the editor. Individual counter items can also be duplicated and reordered.

= Does the plugin load its files on every public page? =

No. It detects common shortcode and block placements and also enqueues assets when the renderer is called. The front-end script has no jQuery dependency. Dashicons remain native, while Font Awesome Free 6.7.2 is bundled locally and scoped to Forge counter icons so it does not depend on Elementor or a theme icon library.

= What happens when the plugin is deleted? =

By default the plugin removes its custom table and options when deleted. You can change this under Forge Counters > Import / Export. Deactivation never removes counter data.

= Does it support multisite? =

Yes. Network activation installs the site-specific table and options for existing sites and initializes new sites added while the plugin remains network active. Each site keeps independent counter instances.

== Shortcode ==

Basic placement:

`[forge_counter id=123]`

Optional accessible label and custom class:

`[forge_counter id=123 aria_label="Service delivery results" class="homepage-statistics"]`

== Credits ==

Font Awesome Free 6.7.2 is included locally for counter icon rendering. Font Awesome icons are licensed under CC BY 4.0, fonts under SIL OFL 1.1, and code under the MIT License. Full notices are included under `assets/vendor/fontawesome/`.

== Privacy ==

Forge Statistics Counter does not collect analytics, track users, create remote accounts, or transmit site content to the plugin author. When an administrator configures an API-backed item, the WordPress server contacts that administrator-specified endpoint to retrieve the value. The public browser contacts only the site's own WordPress AJAX endpoint.

== Changelog ==

= 2.3.9 =
* Declared compatibility through WordPress 7.1.
* Declared the dynamic block iframe-compatible with Block API version 3 on WordPress 6.3 and newer.
* Retained Block API version 2 on WordPress 5.6 through 6.2 so the existing minimum-version support is not reduced.
* Preserved database records, instance IDs, shortcodes, the block namespace, public hooks, rendered markup, API settings, credentials, imports, exports, and uninstall behavior.

Older release details are available in `changelog.txt`.

== Upgrade Notice ==

= 2.3.9 =

Confirms WordPress 7.1 compatibility and declares iframe compatibility while preserving the plugin's WordPress 5.6 minimum and existing data and public behavior.
