=== Sk Share Counter ===
Contributors: khanalsaroj083
Tags: social share, share buttons, share count, sharethis, facebook
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Social share buttons with visible share counts, floating layouts, click/view tracking, count multipliers, and old ShareThis count recovery.

== Description ==

Sk Share Counter adds lightweight social sharing buttons with a displayed total share count. It supports vertical floating sidebars, bottom sticky bars, dual placement, shortcode output, network ordering, brand/custom colors, manual base counts, per-post multipliers, and a global multiplier.

The plugin also includes recovery tools for older share counts:

* Import counts from common WordPress post meta keys used by older share-count plugins.
* Optionally recover old ShareThis totals from ShareThis's public count API.
* Store recovered counts locally in post meta after import.
* Add an exact old ShareThis URL per post when counts were saved under a previous permalink or domain.

If a post has no calculated count, the plugin displays a stable fallback count from 6 to 17 instead of showing zero. The fallback is deterministic per post, so it does not change on every page load.

== External Services ==

This plugin can optionally connect to the ShareThis count API at:

`https://count-server.sharethis.com/v2.0/get_counts`

This request is only made when an administrator enables the "Recover old ShareThis totals" option or runs the bulk legacy import with that option enabled. The plugin sends the post URL being checked so ShareThis can return the old count for that URL. The returned count is saved locally in WordPress post meta.

ShareThis service information:

* ShareThis Social Share Count API: https://sharethis.com/support/customization/social-share-count-api/
 * ShareThis Terms of Use: https://sarojkhanal.com/

== Installation ==

1. Upload the `sk-share-counter` folder to `/wp-content/plugins/`, or install the plugin zip from the WordPress admin.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to Settings > Sk Share Counter.
4. Choose placement, button style, enabled networks, and recovery options.
5. Edit individual posts if you want to set a base count, multiplier, or exact old ShareThis URL.

== Frequently Asked Questions ==

= Why does the plugin show 6 to 17 shares instead of 0? =

When the calculated total is zero, the plugin displays a stable fallback between 6 and 17. This avoids showing "0 Shares" on new or imported posts.

= Can I recover old ShareThis counts? =

Yes. Enable "Recover old ShareThis totals" in Settings > Sk Share Counter. If the old counts were stored under another domain, set the old site base URL, such as `https://www.kanunkhabar.com/`. For a specific post, paste the exact old URL in the post editor's "Old ShareThis URL" field.

= Does ShareThis recovery run automatically? =

Only if you enable it. You can run a bulk import manually, or enable auto-import on first visit.

= Does the plugin track visitors with a third-party service? =

No third-party tracking is loaded for normal share buttons. The optional ShareThis recovery feature contacts ShareThis only when enabled by an administrator, and only to recover historical counts for URLs.

= How are totals calculated? =

The displayed total is:

`round((base + tracked views + share clicks + recovered legacy count) * post multiplier * global multiplier)`

Then it is formatted like YouTube-style numbers, for example `1K`, `1.5M`, or `2B`.

= Can I place the share bar manually? =

Yes. Use the shortcode:

`[skshco_share_bar]`

== Screenshots ==

1. Settings page with placement, styling, networks, and recovery controls.
2. Floating share bar on a single post.
3. Post editor share counter controls.

== Changelog ==

= 1.4.0 =
* Fixed: Replaced domain-parking privacy URL with a legitimate URL.
* Fixed: Standardized all prefixes to unique 6-character "skshco_" to prevent namespace conflicts.

= 1.3.8 =
* Improved share click tracking on mobile by recording taps before external app/browser handoff.

= 1.3.6 =
* Added separate desktop and mobile placement settings.

= 1.3.5 =
* Changed zero-count fallback range to 6 through 17.
* Added compact K, M, and B share count formatting.
* Improved ShareThis count recovery for exact old URLs and migrated domains.
* Added ShareThis recovery settings and per-post old URL field.

== Upgrade Notice ==

= 1.3.8 =
Improves mobile share click tracking.
