=== AskThis AI Social Sharing ===
Contributors: askthis
Tags: sharing, social, ai, chatgpt, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI SEO and social sharing: one-tap "ask an AI" buttons plus AI Graph meta tags so answer engines summarize and cite your content correctly.

== Description ==

AskThis adds a lightweight (<12KB) sharing widget to your posts, pages and WooCommerce products:

* Social share buttons — 28 networks, pick the ones you want: Facebook, X (Twitter), LinkedIn, WhatsApp, Pinterest, Reddit, Telegram, email, SMS and copy link; Line, VK, Viber, Weibo, Bluesky, Threads, Tumblr, Pocket, Hacker News, Flipboard and Xing; plus copy-to-app sharing for Messenger, Instagram, TikTok, Snapchat, WeChat, KakaoTalk and Mastodon.
* AI buttons — visitors send your page to any of 14 AI engines (ChatGPT, Claude, Gemini, Perplexity, Copilot, Grok, Mistral, DeepSeek, DuckDuckGo, Brave, Kagi, Consensus, SciSpace and Andi) with a neutral, citation-friendly prompt built for the page type.
* AI Graph meta tags (`ai:type`, `ai:title`, `ai:summary`, `ai:cite_as`, and product tags like `ai:price` and `ai:availability`) that tell AI answer engines how to read, summarize and cite your pages.
* WooCommerce and ecommerce aware: product pages automatically map title, price, currency, brand and stock status into the AI tags and prompts, so an AI answering "is this the right product for me" reads accurate e-commerce data instead of guessing.

**AI SEO / answer engine optimization.** Search is shifting from ten blue links to answers
written by AI. AskThis gives you both halves of that: AI Graph meta tags describe your page
in a vocabulary answer engines can read, so you are summarized accurately and cited by name
rather than paraphrased away — and the AI share buttons let a reader carry your page into
ChatGPT, Claude, Gemini or Perplexity with a prompt that asks the engine to cite the source.
This is what AI SEO, answer engine optimization (AEO) and generative engine optimization
(GEO) describe: being readable, quotable and attributable to machines, not just to people.
In practice it means AI visibility in AI search — an LLM that reaches your page can identify
what it is, summarize it faithfully and produce an AI citation pointing back to you, which is
the difference between traffic from search engines and being quietly absorbed into an answer.

The widget loads asynchronously from a CDN and never blocks page rendering, and works with classic and block themes.

**Cache friendly.** Changing a setting clears the page cache for you — AskThis triggers a purge in LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache and SG Optimizer, so you never have to wonder why a layout change did not appear on the front end.

Place it automatically after your content, or manually with the **AskThis Share Widget** block, the `[askthis]` shortcode, or the classic **AskThis Share Widget** widget in any widget area.

== Installation ==

1. Install via Plugins → Add New and search for **AskThis**, or upload the plugin zip (it unpacks to `askthis-ai-social-sharing/` in `/wp-content/plugins/`).
2. Activate the plugin through the Plugins screen.
3. Go to **Settings → AskThis** and paste the Site ID from your AskThis dashboard.
4. Choose layout, networks, AI platforms and theme. Done — the widget appears after your content.

To place the widget manually, disable "Auto-insert" and use the AskThis Share Widget block (or `[askthis]`) wherever you want it.

== Frequently Asked Questions ==

= Does the plugin slow my site down? =

No. One async script tag is added; nothing render-blocking, no jQuery, no external CSS. If the CDN is unreachable the page renders normally without the widget.

= Does it work with WooCommerce? =

Yes. Product pages get a product-type prompt and additional AI Graph tags: price, currency, brand (from the `brand`/`pa_brand` attribute) and availability from live stock status.

= Does it track my visitors? =

The plugin itself stores nothing about visitors. The widget records pseudonymous, consent-gated interaction events only (no names, emails or IPs), per the AskThis privacy policy.

= Can I change the CDN URL? =

Yes, in code: `add_filter( 'askthis_script_url', fn() => 'https://widgets.example.com/widget.js' );`

= Where does the widget appear? =

On single posts (article prompts), pages (generic prompts) and WooCommerce products (product prompts). Archives, feeds and embeds are excluded.

== Screenshots ==

1. The widget on a published post — social share buttons plus "Ask AI" buttons that open ChatGPT, Gemini, Perplexity or Claude with a pre-built, source-citing prompt for the page.
2. Settings → AskThis: paste your Site ID, choose layout and placement. Your plan's features are listed on the right and apply automatically — nothing to reinstall.
3. Pick exactly which buttons appear: 28 share networks in three groups, and 14 AI engines. Every network is free on every plan; engines above your plan are shown but inactive.
4. The AskThis Share Widget block, placed mid-post in the editor — for when you want the share row somewhere other than after your content.

== External services ==

This plugin connects to AskThis (askthis.io), the service that powers the
sharing widget and its analytics. An AskThis account and Site ID are required
for the plugin to do anything.

Three separate connections are made:

1. Widget script -- cdn.askthis.io
   On every page where the widget is enabled, the visitor's browser loads
   https://cdn.askthis.io/widget.js. No data is sent by the plugin; this is a
   script request, so the visitor's IP address and user agent reach AskThis as
   they would with any externally hosted script.

2. Site ID verification -- api.askthis.io
   When an administrator saves the plugin settings, the site makes one
   server-side request to https://api.askthis.io/api/v1/sites/{site-id}/config
   to confirm the Site ID is valid. Only the Site ID is sent. No visitor data
   and no site content are included. If the request fails the setting is still
   saved; verification is advisory.

3. Interaction analytics -- ingest.askthis.io
   When a visitor views or interacts with the widget, the widget sends event
   data to https://ingest.askthis.io. Each event contains: the event type
   (view, share, ai_click, question), your Site ID, the platform or AI engine
   chosen, the URL of the page, and a timestamp. If a visitor types a question
   into the AI panel, that question text is included. Events are batched in the
   browser and sent periodically, not on every interaction.
   AskThis derives a pseudonymous identifier at its edge for deduplication. The
   plugin itself stores nothing about visitors and sets no cookies.

Service provided by Agochar Tech LLP.
Terms of service: https://askthis.io/legal/terms/
Privacy policy: https://askthis.io/legal/privacy/

== Changelog ==

= 0.1.2 =
* Listing screenshots replaced: the widget on a real post, the settings screen, the button pickers and the editor block — all captured in a real WordPress admin.
* Fixed the Plugin URI, which pointed at a page that did not exist.
* Corrected the manual-install folder name in the installation steps.
* Tested against WordPress 7.1.
* Translation template regenerated — 13 admin strings added in 0.1.1 were missing from it and could not be translated.

= 0.1.1 =
* The settings screen's layout CSS now loads through `wp_add_inline_style()` on `admin_enqueue_scripts` instead of a printed style tag, and only on that screen.

= 0.1.0 =
* Initial release.
* Settings screen (Settings → AskThis): site ID (verified against the AskThis API on save), layout, networks, AI platforms, theme, position, auto-insert.
* "Unlock premium AI features" panel linking to plan & billing on the AskThis dashboard — paid features apply to your site automatically once you upgrade.
* Async widget injection with the WordPress 6.3 loading strategy (manual async attribute on 6.0–6.2).
* AI Graph v1.0 meta tags for posts, pages and WooCommerce products (incl. price, currency, brand, availability, category path, published/updated dates, language and author).
* Gutenberg block `askthis/share-widget`, `[askthis]` shortcode, and a classic widget-area widget.

== Upgrade Notice ==

= 0.1.2 =
Documentation and listing only — no functional change. Safe to skip if you are running 0.1.1.

= 0.1.1 =
Loads the settings screen's CSS through the WordPress enqueue system.

= 0.1.0 =
First release.
