=== HyShare Social Share Buttons ===
Contributors: himanshuyadaven
Donate link: https://himanshusir.in
Tags: share buttons, social share, share count, floating share bar, whatsapp share
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add distinctive social share buttons with optional click-based counts, a floating bar, and shortcodes. Built by Himanshu Yadav (HyShare).

== Description ==

**HyShare Social Share Buttons** adds social sharing buttons to your posts and pages.

= Features =

* Inline share buttons (above, below, both, or after the first paragraph)
* Click-based share counts (counts button clicks on your site)
* Optional starting count (offset added to click counts for display)
* Per-post count controls in the editor
* Floating side share bar
* Copy link button
* WhatsApp, Telegram, Facebook, Truth Social, X (Twitter), LinkedIn, Bluesky, and more
* Shortcodes: [hyshare_share_buttons] and [hyshare_share_count]
* Share statistics and CSV export
* Dark mode bar, mobile label modes, thank-you message
* Lightweight: frontend assets load only when needed

= Important: About share counts =

Share counts in this plugin are **click-based**. They increase when a visitor clicks a share button on your website. They are **not** official share totals from Facebook, X, LinkedIn, or other networks, and they do not call those network APIs.

Displayed total = Starting count (optional) + click counts on your site.

= Shortcodes =

* `[hyshare_share_buttons]` — display the share bar
* `[hyshare_share_count]` — display the share count only

= Privacy =

To limit rapid repeat clicks, the plugin may store a short-lived technical key (based on post ID and visitor IP) as a WordPress transient. This is used only to prevent count spam, is not sold, and is not used for advertising.

== External services ==

This plugin constructs share links that open third-party social network share dialogs when a visitor clicks a share button. No data is sent automatically by the plugin server-side; the browser navigates (or opens a new tab) to the chosen network’s share endpoint with the current page URL and title.

Services used (when the corresponding network is enabled):

* WhatsApp (api.whatsapp.com) — opens WhatsApp share with pre-filled text. Terms: https://www.whatsapp.com/legal/terms-of-service Privacy: https://www.whatsapp.com/legal/privacy-policy
* Telegram (t.me) — opens Telegram share. Terms: https://telegram.org/tos Privacy: https://telegram.org/privacy
* Facebook (facebook.com) — opens Facebook sharer. Terms: https://www.facebook.com/terms Privacy: https://www.facebook.com/privacy/policy
* X / Twitter (x.com) — opens post composer. Terms: https://x.com/tos Privacy: https://x.com/privacy
* LinkedIn (linkedin.com) — opens share-offsite. Terms: https://www.linkedin.com/legal/user-agreement Privacy: https://www.linkedin.com/legal/privacy-policy
* Pinterest, Reddit, Bluesky, Threads, Nextdoor, and other networks listed in the plugin settings — each opens that network’s public share/intent URL with the page URL (and sometimes title). Consult each network’s own terms and privacy policy.

No personal data is transmitted by the plugin itself beyond what the visitor’s browser sends when following a normal share link. The plugin does not register with or call network APIs in the background.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the ZIP via **Plugins → Add New → Upload**.
2. Activate **HyShare Social Share Buttons** through the **Plugins** menu.
3. Go to **HyShare** in the admin menu to configure networks and display options.

== Frequently Asked Questions ==

= Are these official Facebook / X share counts? =

No. Counts track share **button clicks on your site only**. They are not pulled from social network APIs.

= What is the starting count? =

An optional number you can set globally or per post. It is added to click counts when showing the total. It is not a claim of external network shares.

= Can I set a different starting count per post? =

Yes. Edit a post and use the **HyShare Share Counts** box in the sidebar.

= Does it work on mobile? =

Yes. You can control mobile visibility and whether labels show as icons only on small screens.

= How do I place buttons in a custom location? =

Use the shortcode `[hyshare_share_buttons]` in content, widgets (if shortcodes are enabled), or a block that supports shortcodes.

== Changelog ==

= 1.0.2 =
* Fixed CSV export: report data is no longer HTML-escaped, which previously corrupted quotes and ampersands and produced a malformed file
* CSV cells are now escaped for CSV context per RFC 4180, with protection against spreadsheet formula (CSV) injection
* Renamed shortcodes to unique, prefixed names: [hyshare_share_buttons] and [hyshare_share_count]
* Renamed the admin page slug from the generic "share-buttons" to "hyshare-social-share-buttons" to avoid conflicts
* Fixed admin styles and scripts not loading, caused by the settings page slug not matching the asset enqueue check
* Admin menu labels are now translatable
* Added an explicit capability check on the CSV export handler
* Post meta input in the editor metabox is now unslashed and sanitized before use
* Shortcodes are now registered in all contexts, so content rendered via admin-ajax, the REST API, or page builders resolves them correctly

= 1.0.1 =
* Distinctive plugin name and slug (HyShare branding)
* Documented third-party share services in readme
* Hardened settings sanitization (whitelist only known keys)
* Contributors list updated to match WordPress.org username
* Text domain updated

= 1.0.0 =
* Initial public release
* Share buttons, click-based counts, starting count offset
* Floating bar, shortcodes, stats, CSV export
* 25+ networks, mobile options, dark mode

== Upgrade Notice ==

= 1.0.2 =
Shortcodes renamed to [hyshare_share_buttons] and [hyshare_share_count] to prevent conflicts. Update any shortcodes in your content. Also fixes corrupted CSV exports.

= 1.0.1 =
Name, sanitization, and documentation updates for WordPress.org review.
