=== MWR Hit Counter ===
Contributors: scriptsworks
Author: Daniel Martín Ochoa
Author URI: https://miwebrentable.com
Donate link: https://www.paypal.me/miwebrentable
Tags: hit counter, page counter, page visit, wordpress page view, page view count, post view count, easy counter, counter, single counter
Requires at least: 5.0
Tested up to: 6.8.2
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

== Description ==

MWR Hit Counter is a simple and lightweight text-based counter for your website.  
It uses a single database table and a cookie to count unique visitors over 30 days.  
No IP tracking, no bloated features — just a clean counter you can display anywhere.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/mwr-hit-counter` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Add the shortcode where you want the counter to appear.

= Examples =

Template code (in PHP):
<code>
<?php echo do_shortcode( '[mwrcounter start=500]' ); ?>
</code>

Post/Page code:
<code>
[mwrcounter start=500]
</code>

== Frequently Asked Questions ==

= Which WordPress versions are supported? =
Tested with WordPress 6.8.2 and should work with any version from 5.0+.

= Why does the counter not increase on page refresh? =
This plugin uses a cookie (valid for 30 days) to prevent counting the same user repeatedly.

= Can I change the starting value? =
Yes, use the `start` attribute in the shortcode: `[mwrcounter start=100]`.

== Screenshots ==

1. Shortcode usage example (screenshot-1.png)

== Changelog ==

= 1.1.0 =
* Updated for compatibility with WordPress 6.8.2
* Improved database table creation using `dbDelta()` with primary key
* Added safety checks for PHP 8+
* Secure cookie parameters for better compatibility
* Code cleanup and better escaping for database operations

= 0.1 =
* Initial release

== Upgrade Notice ==

= 1.1.0 =
This update improves security, fixes compatibility with the latest WordPress and PHP versions, and ensures reliable counting.

