=== AskMyPages – AI Search & Chat ===
Contributors: hookandplug
Tags: ai search, chatbot, search, semantic search, pdf
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.9.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI search and chat for WordPress. Answers come only from your own pages and PDFs, with links to the source. Keeps your theme's search box.

== Description ==

AskMyPages is AI search and chat for WordPress, run as a hosted service by Hook & Plug. It upgrades the search box your theme already has to find pages by meaning, and adds an assistant that answers visitors' questions from your own pages and text PDFs, citing the page or PDF page every time. When your site doesn't cover something, it says so instead of guessing.

* **Search and chat**, not a chat bubble alone: your existing search box and results page get better; the chat is optional.
* **PDFs included**: handbooks, agreements, policies and price lists in your Media Library are searched and answered from, with the page number.
* **Every answer cites its source**, so visitors (and you) can check it in one click.
* **Flat plans, no surprise bills**: a free plan with no card, then fixed monthly caps; never per-token charges or prepaid credit.
* **Your theme, your colours**: match the site, or pick Light or Dark and your own accent and picture.
* **Private by design**: only published, public content you choose is sent; nothing is used to train AI models; disconnecting deletes your index.

Set-up takes about a minute: install, click Connect, tick the content types.

**Search that understands what people mean**

Your theme's existing search box and results page stay exactly as they are. AskMyPages decides which results show and in what order, matching meaning as well as exact words, so "help paying for a course" finds your education fund page. If the service is ever unavailable, WordPress search takes over automatically.

**Answers from your content, with sources**

A chat button appears on every page (on by default; turn it off any time). Visitors ask a question and get a short answer from your pages and PDFs, with numbered links to the sources. Follow-up questions work. If your content doesn't cover something, the assistant says so instead of guessing. On the search results page, an answer card above the results turns the search into a short answer in one click, and follow-up questions continue in the chat.

**PDFs included**

Text PDFs in your Media Library become searchable too: agreements, handbooks, policies, menus. Answers link to the right page of the PDF.

**Made for site owners, not developers**

* No API keys to copy and no AI account to set up: click Connect, sign in with your email, done.
* A short Getting started checklist and a "Try it" box to test answers before visitors see them.
* The chat takes your theme's colours, font and button shape, or a colour you choose.
* Change what the chat says: the button, the question box and its messages.
* Choose what goes into search: content types, categories to leave out, and a "Leave this out" box on each post, page and PDF.
* Choose who sees the chat: everyone, logged-in users, or chosen roles.
* Change what the chat says, give the assistant a name, greeting and suggested questions, and place the chat inside a page with a shortcode.
* A connection check, also in Tools → Site Health, that spots hosting problems and explains the fix.

**No surprise bills**

Every plan has a monthly allowance of searches and AI answers, a limit on questions per visitor per day, and a spending cap. When the month's answers are used, the chat pauses and search keeps working; you get an email at 80% and 100%.

**Plans**

Everything in the plugin works on every plan. The AskMyPages service's Free plan covers one site with 500 items (posts, pages and up to 150 PDF pages), 1,000 searches and 100 AI answers a month. Paid plans of the service add more sites, items, searches and answers, indexing of custom post types such as WooCommerce products, a choice of answer tone, and answering only from chosen categories. See [hookandplug.com/askmypages](https://hookandplug.com/askmypages#pricing).

Your content is never used to train AI models.

== Installation ==

1. In WordPress, go to Plugins → Add New, search for "AskMyPages", then install and activate it.
2. Open AskMyPages in the admin menu and click Connect.
3. Sign in to Hook & Plug with your email address (you get a sign-in link; no password) and approve the connection.
4. Back in WordPress, your published content is prepared in the background. Follow the Getting started checklist.

Requirements: WordPress 6.4 or later, PHP 8.1 or later, and a host that allows outgoing HTTPS requests. WP-Cron must run (it does on most sites; the connection check tells you if it doesn't).

== Frequently Asked Questions ==

= Do I need an OpenAI account or API key? =

No. AskMyPages runs on the Hook & Plug service, which provides the AI. You only sign in with your email.

= Is my content used to train AI models? =

No. Your content is used only to answer searches and questions on your own site.

= Which content is included? =

Published, public posts and pages by default, and text PDFs from the Media Library. Drafts, private and password-protected content, and pages marked noindex in Yoast SEO or Rank Math are never sent. You can leave out categories or single items.

= Does it work with my theme? =

Yes. Search uses your theme's own search box and results page, and the chat button sits on top of any theme in its own isolated layer, styled from your theme's colours and font.

= What happens if the service is down or the monthly limit is reached? =

Search falls back to normal WordPress search, and the chat says answers are paused. Nothing on your site breaks.

= Can it read scanned PDFs? =

Not yet. Scanned PDFs have no readable text; AskMyPages lists them so you know which ones are not searchable.

= Can I limit who sees the chat? =

Yes: everyone, only logged-in users, or users with chosen roles. Only public content is ever used for answers.

= Can I use it on several sites? =

The Free and Starter plans include one site; larger plans include more. One Hook & Plug account covers all your sites.

= What does uninstalling remove? =

Disconnecting deletes this site's keys and its content on the service. Deleting the plugin also removes all its settings from WordPress.

== Screenshots ==

1. Visitors ask a question and get a short answer from your content, with links to the sources.
2. The answer card on the search results page turns a search into an answer.
3. The Overview: content, search and chat at a glance (a Getting started checklist shows until setup is done).
4. Chat settings: who sees it, colours, and "Try it" for test questions.
5. Choose what goes into search: content types, PDFs and categories.
6. The connection check explains hosting problems in plain words.

== External services ==

This plugin connects to the AskMyPages service operated by Hook & Plug (Shipalu LLC) at https://api.hookandplug.com and https://app.hookandplug.com. Terms of use: https://hookandplug.com/terms. Privacy policy: https://hookandplug.com/privacy.

* When you click Connect, your browser opens app.hookandplug.com with your site's address, name and the site's public key, so you can sign in and approve the connection.
* After connecting, the plugin sends the published, public posts and pages you choose (title, address, text, category names) to api.hookandplug.com in signed requests, and checks daily that the service has the latest version. Each request includes the plugin's version number.
* If PDFs are included (AskMyPages → Content), the plugin uploads each PDF from your Media Library. The service reads its text and does not keep the file.
* The service uses OpenAI to understand searches, write answers and check questions and answers for harmful content. Your content and visitors' questions are sent to OpenAI for those purposes only; they are not used to train AI models.
* If you turn on chat, visitors' browsers send the questions they type in the chat to api.hookandplug.com, using your site's public key. On the search results page, the visitor's search is sent the same way when they click the answer card's button (or straight away, if you turn on answering question-like searches on a paid plan). Nothing is sent until a visitor asks. A conversation is kept for 30 minutes so follow-up questions work, then deleted. To apply the daily question limit, the service keeps a one-way hash of the visitor's network address for one day; the address itself is not stored. The plugin sets no cookies; the chat remembers the conversation in the browser tab (session storage).
* When a visitor uses your site's search box, their search terms are sent to api.hookandplug.com to fetch results. No visitor names, accounts or cookies are sent by the plugin; the service sees the request coming from your web server. You can turn the search upgrade off in AskMyPages → Search.
* The connection check (AskMyPages → Connection and Tools → Site Health) contacts api.hookandplug.com to confirm it can be reached.
* Nothing is sent before you click Connect, and nothing is sent after you disconnect.

== Changelog ==

= 0.9.2 =
* An Upgrade to Starter button in the plugin header and a Starter card on the Overview tab for sites on the Free plan; it opens the plan's checkout in your Hook & Plug account.

= 0.9.1 =
* Works on PHP 7.4 and newer (was 8.1), for sites still on older hosting. Tested on PHP 7.4, 8.0, 8.1 and newer.

= 0.9.0 =
* First release on WordPress.org. Everything from the 0.8 series: search by meaning in your theme's own search box, the answer card on search results, the chat with its rounded design, picture and colour choices, text PDFs, the Content tab with per-item status and re-index, the connection check, and the one-click connection to a Hook & Plug account.

= 0.8.15 =
* Chat colours: choose Match my site, Light or Dark, with an optional accent colour in any of them. "Match my site" now samples the content area rather than the page body and never pairs text and background that do not read well together.

= 0.8.14 =
* When a site is disconnected from the account portal or by an administrator, the plugin notices on its next request, turns search and chat off, and explains why, with Connect offered again.

= 0.8.13 =
* A single request for a WordPress.org review on the plugin's Overview tab once visitors have had 25 answers in a month; dismissed with one click and never shown again.

= 0.8.12 =
* Friendlier example questions in the admin and the listing.

= 0.8.11 =
* Chat: a picture for the assistant (AskMyPages → Chat → Look → Picture): your site icon by default, any image from the Media Library, or none. Shown as a circle in the chat header and on the button.

= 0.8.10 =
* Chat: keyboard focus rings follow the rounded shapes; the text box no longer shows a square outline inside the rounded composer.

= 0.8.9 =
* Chat redesign: a rounded button and window, the assistant's name with a short subtitle, questions and answers as messages, typing dots while an answer is written, and numbered source cards. Still uses your site's colours and font.
* Chat is on for visitors by default once connected; turn it off any time under AskMyPages → Chat.

= 0.8.8 =
* New name: AskMyPages (previously AskMyPress). Plugin slug, text domain, shortcodes, settings and WP-CLI command are now `askmypages`.

= 0.8.7 =
* Every feature in the plugin works on every plan: chat visibility by role, all wording, the assistant's name, greeting and suggested questions, answering question-like searches, and placing the chat in a page. Plan limits are applied by the AskMyPages service.
* "Powered by AskMyPages" under the chat is off unless the site owner turns it on (AskMyPages → Chat → Look).
* All content types can be chosen; the service indexes custom post types on paid plans.
* Connecting: a declined connection is cancelled only when the returned one-time state matches.

= 0.8.6 =
* An Items list on the Content tab: every item in search and chat with its state (in search, being prepared, no readable text, failed and why), a "Problems only" filter, and a Re-index button that sends an item again.
* Items that failed are retried when sent again unchanged, and items stuck waiting are queued again.

= 0.8.5 =
* The bundled Action Scheduler library (unchanged, 4.2.0) moved to vendor/woocommerce/action-scheduler, with a composer.json naming it.

= 0.8.4 =
* "Paid plans" labels link to the plans, and the answer-limit, item-limit and paid-feature notes on AskMyPages screens include a "See plans" link. Paid plans get "Manage plan" in the header.
* A note on the Overview when the plan's item limit is almost reached or reached.

= 0.8.3 =
* Phones: the open chat fits the screen above the keyboard instead of being pushed up by it, the page behind it no longer scrolls, and it leaves room for the notch and home bar.
* Phones: the question box no longer zooms the page when tapped, and the send button always fits.

= 0.8.2 =
* The posts page (for example "Blog" or "News") is no longer sent: it shows the list of posts, which are indexed one by one, so it was wrongly flagged as having no readable text.
* "Chat and answers" replaces the old "Ask AI" heading.
* The item estimate on the Content tab no longer counts the posts page.

= 0.8.1 =
* "Upgrade" and "See plans" open the AskMyPages page of your Hook & Plug account.

= 0.8.0 =
* Wording settings in AskMyPages → Chat: change the chat button, question box, note under answers and the "couldn't find an answer" message on any plan; the remaining messages (search answer card, daily limit, busy, paused) on paid plans.

= 0.7.2 =
* No divider above the first question when a conversation moves from the answer card to the chat.

= 0.7.1 =
* A follow-up typed in the search answer card opens the chat, with the conversation carried over.
* The answer card lines up with the search results instead of spanning the page.
* "Powered by" shows the AskMyPages logo only, on its own line below the disclaimer.

= 0.7.0 =
* Search results get an answer card above the results: one click answers the search, and follow-up questions continue in the card.
* Answers speak as part of your site instead of referring to "this site", and questions like "what else is useful for me?" are answered.
* Citation numbers run 1, 2, 3 in the order they appear and match the Sources list; answers that cite nothing show no sources.
* "Powered by" shows the AskMyPages and Hook & Plug logos (Free plan).

= 0.6.0 =
* Getting started checklist on the Overview, and a setup notice after activation.
* Connection check on AskMyPages → Connection and in Tools → Site Health: reaching the service, server clock, background jobs and loopback requests, each with a plain-language fix.
* The plugin reports its version to the service, and shows a notice if an update is needed to keep working.
* Code checked against the WordPress coding standards and Plugin Check.
* Content types written by visitors (forums, Q&A) are marked with a warning on the Content tab.
* The assistant stays on topic, ignores instructions planted in content, and refuses harmful requests.

= 0.5.0 =
* AskMyPages has its own menu in WordPress admin, with Overview, Content, Search, Chat and Connection.
* AI answers and chat: a chat button on every page and "Ask about…" on search results, answering only from your content with links to the sources. Off until you turn it on.
* PDFs from the Media Library are searchable, and answers link to the right page.
* The chat takes your theme's colours, font and button shape (or a colour you pick), opens and closes with a subtle animation, and sits bottom right or left.
* Disconnecting also deletes your content from the service.
* "Try it" in AskMyPages → Chat: ask test questions (50 a month) without using your visitors' answers.
* Limit questions per visitor per day (default 20).
* Choose who sees the chat: everyone or logged-in users; specific roles on paid plans.
* Paid plans: assistant name, greeting, tone and suggested questions; [askmypages_chat] to place the chat in a page, optionally answering only from chosen categories.

= 0.4.0 =
* Choose what goes into search: content types (custom types such as products on paid plans), categories to leave out, and a "leave this out" box on each post and page.
* Search understands meaning as well as exact words.

= 0.3.0 =
* Your theme's search results page shows AskMyPages results in best-match order, falling back to WordPress search if the service is unavailable or the monthly search limit is reached.

= 0.2.0 =
* Sync published posts and pages in the background, with a daily check for anything missed.

= 0.1.0 =
* Connect and disconnect your site.
