=== AiProfile Inside ===
Contributors: aiprofile
Tags: faq, questions and answers, structured data, llms.txt, ai
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your AiProfile questions and answers on a page of your own site, in your theme's style, readable by search engines and AI assistants.

== Description ==

Your AiProfile holds the questions customers ask about your business, with your answers and their sources. AiProfile Inside puts them on a page of your own website. The content stays live: what you change on AiProfile appears on your page within ten minutes, or at once if you switch that on.

The answers are rendered on your server, into the page's own HTML. Search engines and AI assistants that read your page, also the ones that do not run JavaScript, see every question, answer and source link, with FAQPage structured data. No script from AiProfile runs in your visitors' browsers, and the plugin does not track your visitors.

An AiProfile account is needed: the plugin shows the profile you connect. You can find yours, or make one, on https://www.aiprofile.com.

= Setup in one minute =

1. Install and activate the plugin. It opens Settings, AiProfile.
2. The plugin looks up the AiProfile that has your site's address as its website and shows the name of your business and the number of questions. When several businesses share your site's address, you pick yours from a short list. When none has it, paste your AiProfile link (aiprofile.com/your-name, your profile URL, or your business id) and click Check.
3. Click Connect. The plugin makes a page "Frequently asked questions" with your answers and puts a small link "AiProfile" to that page in your site's footer. A page that already holds the shortcode is reused instead.

= The link in your footer =

Connecting puts a small link "AiProfile", with the AiProfile mark, in the footer of your site. It leads to your own answers page on your own site, not to another website. Where it goes:

* Classic themes: as an item in the menu of your footer (a footer menu location with a menu assigned to it).
* Block themes: as a link in the Navigation block of your footer, when that block shows a menu of its own.
* Otherwise: as a small line at the bottom of every page, printed by the plugin.

The settings screen says which one is used, and "Remove the link from my footer" takes it out again (only the item the plugin added). Deleting the plugin removes it too.

Sites that connected with version 1.2 or older keep the page in their main menu. Nothing changes for them unless they click "Move to my footer" on the settings screen: that takes out only the menu item the plugin added itself and puts the footer link in its place.

= Settings =

Each one you switch on or off yourself, on the same screen.

* **Update automatically** (off by default). When you change an answer on AiProfile, your page shows it straight away instead of within ten minutes. Uses a one-time registration with AiProfile; see "External services" below.
* **Questions from visitors** (off by default). A small form "Is your question not here?" under the answers. The question reaches you on AiProfile as a question to answer. A visitor's email address is sent only if he adds it and ticks the consent box.
* **Link to your AiProfile** (off by default). A small "Powered by AiProfile" link, with the AiProfile mark, in the badge above your answers. It shows search engines and AI assistants that your site and your verified profile belong together.
* **Business details for search engines** (on the answers page by default). schema.org LocalBusiness structured data with your business name, address, phone number, opening hours, website and profiles. Also possible on every page, or off. Left out automatically when Yoast SEO, Rank Math or All in One SEO already describes your business.
* **llms.txt** (off by default). Serves /llms.txt with your business and a link to your answers page, for AI tools that read that file. Only when your site has no llms.txt file of its own.

= Can AI assistants read your site? =

The settings screen checks your robots.txt for GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-Extended, Googlebot and Bingbot, and warns when one of them may not read your home page or your answers page. When your robots.txt is made by WordPress, one click lets them in (and one click undoes it). A robots.txt file on your server is never changed; the screen says what to ask your host. This check happens on your own site; nothing is sent anywhere.

= Shortcode (advanced) =

`[aiprofile]` shows the connected profile on any page (in the block editor: a Shortcode block). Options:

* `profiel` (or `profile`): another profile: a short link, a profile URL, or a business id.
* `taal` (or `lang`): the language, for example `nl` or `en`. By default: your site's language when your profile has it, else your profile's home language.
* `titel="ja"` (or `title="yes"`): adds a heading "Frequently asked questions about ..." above the answers. Off by default, because the page's own title is the heading.
* `jsonld="0"`: leaves out the FAQPage structured data, for example when your SEO plugin already adds it.

The block uses plain headings, paragraphs and links, so your theme decides how it looks. Above the answers is a small badge: "Verified by" your business with the date of your latest change (once you claimed your profile), "Optimized for AI agents", and "Powered by AiProfile" when you switched that link on. It gets its look from a small stylesheet that the plugin loads only on pages with the answers. The `aiprofile-*` classes are there for custom CSS.

If AiProfile cannot be reached, the page shows the last copy it had (kept for 7 days). If there is nothing to show, the block prints nothing visible.

== External services ==

This plugin connects to AiProfile (https://www.aiprofile.com), the service that hosts your profile. All requests go from your web server to AiProfile; none come from your visitors' browsers. No cookies are set and nothing about your visitors is sent, except a question a visitor chooses to send (see 4).

1. **Your questions and answers** (always, once a profile is connected). To show your answers, the plugin fetches them from `https://www.aiprofile.com/api/v1/embed`, at most once every ten minutes per profile and language, when a page with the answers is viewed, once when you click Check, and twice a day in the background (WP-Cron) to see whether your answers changed. Sent: the profile key you connected, the language, and your site's address (in the User-Agent and Referer headers).
2. **Your business details** (when "Business details for search engines" or "llms.txt" is on; the first is on by default). The plugin fetches them from `https://www.aiprofile.com/api/v1/embed/business`, at most once an hour. Sent: the same as in 1.
3. **Update automatically** (only when you switch it on). The plugin registers your site once at `https://www.aiprofile.com/api/v1/embed/site`. Sent: the profile key, your site's address, the address of the plugin's ping route on your site, a random secret key the plugin makes, your site's language and the plugin version. AiProfile then sends a signed message to that route when you change an answer, and the plugin refreshes its copy. When you switch this (and the question form) off, or delete the plugin, the plugin asks AiProfile to forget the registration.
4. **Questions from visitors** (only when you switch it on). Uses the registration of 3. When a visitor sends a question, the plugin sends it to `https://www.aiprofile.com/api/v1/embed/question` with the language and the address of the page. The visitor's email address is sent only when he fills it in and ticks the consent box. The visitor's IP address is not sent; the plugin keeps a hash of it on your site for ten minutes, to limit how many questions one visitor can send.

5. **Finding your profile** (on the settings screen, until a profile is connected). The plugin asks `https://www.aiprofile.com/api/v1/embed/find` which AiProfile has your site's address as its website, at most once every ten minutes. Sent: your site's address and language (and your site's address in the User-Agent and Referer headers, as in 1). AiProfile answers with the name of the business, the number of questions and the link to its profile, nothing else.

* Terms of service: https://www.aiprofile.com/terms
* Privacy policy: https://www.aiprofile.com/privacy

The address of the service can be changed with `define( 'AIPROFILE_INSIDE_ORIGIN', 'https://...' );` in wp-config.php or the `aiprofile_inside_origin` filter.

== Installation ==

1. In your WordPress admin, go to Plugins, Add New Plugin, and search for "AiProfile Inside". Or upload the ZIP under Plugins, Add New Plugin, Upload Plugin.
2. Activate the plugin. It opens Settings, AiProfile.
3. Click Connect when the plugin shows your business, or paste your AiProfile link, click Check, then Connect.

== Frequently Asked Questions ==

= Do I need an AiProfile? =

Yes. The plugin shows the questions and answers of the AiProfile you connect. You find yours, or make one, on https://www.aiprofile.com.

= Where do I change my answers? =

On AiProfile. The page on your site follows within ten minutes, or at once with "Update automatically" switched on.

= I use a page cache plugin. Do my changes still show? =

Yes. A page cache serves a stored copy of your page, so the plugin clears that copy itself: at once when "Update automatically" is on, and otherwise within half a day, when its twice-daily check sees that your answers changed. This works with WP-Optimize, LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer and Breeze.

= Does it slow down my page? =

No. The answers are kept on your site and asked again at most once every ten minutes; the request to AiProfile times out after 5 seconds, and then the last copy is shown.

= Does the plugin track my visitors? =

No. It sets no cookies, loads no script from AiProfile, and sends nothing about your visitors. The only exception is a question a visitor sends himself through the optional form.

= My SEO plugin already adds structured data. Will there be duplicates? =

The FAQPage data belongs to the answers; leave it out with `jsonld="0"` in the shortcode if your SEO plugin adds its own. The LocalBusiness data is left out automatically when Yoast SEO, Rank Math or All in One SEO already describes your business.

= The AI check says my robots.txt blocks crawlers. What now? =

When WordPress makes your robots.txt, click "Let them read my site". When it is a file on your server, ask your web host or developer to remove the "Disallow" lines for those crawlers. A firewall or CDN (for example a "block AI bots" setting) can also block crawlers; the plugin cannot see those.

= What is removed when I delete the plugin? =

All cached answers, the plugin's settings and the "AiProfile" link in your footer, and AiProfile is asked to forget the registration of "Update automatically". The page with your answers stays; delete it yourself if you no longer want it.

== Screenshots ==

1. Connect your AiProfile: paste one link, or the plugin finds your business by your site's address.
2. The plugin found your business and asks whether to update your site automatically.
3. Connected: your page, the footer link, and the settings.
4. The answers page in your theme, with the question form.
5. The AI access check warns when your robots.txt blocks AI crawlers.

== Changelog ==

= 1.3.4 =
* The switch for instant updates is now called "Update this site automatically" (on the settings screen: "Update automatically"). It works as before.

= 1.3.3 =
* The plugin finds your AiProfile by your site's address: the settings screen shows "Found: your business" with the Connect button straight away, so there is no link to paste. When several businesses share your address you pick yours from a list, and "Use another link" still lets you paste a link.

= 1.3.2 =
* Your questions keep their own capitals under themes that write every word with a capital (such as Astra).
* More room between the groups of questions, and even spacing between the questions, whatever margins your theme gives its headings.
* With a page cache plugin, a change on AiProfile now reaches your page: "Show changes at once" also clears the page cache, and a twice-daily check does the same when your answers changed.

= 1.3.1 =
* The AI access check takes your site's admin paths from WordPress instead of assuming /wp-admin/.
* Translations now come from translate.wordpress.org.

= 1.3.0 =
* Connecting puts a small link "AiProfile" with the AiProfile mark in your footer (footer menu, footer navigation, or a line of its own), instead of putting the page in your main menu. You can remove it on the settings screen.
* Sites connected with an older version keep their menu item; "Move to my footer" moves it when you want.
* A badge above your answers: "Verified by" your business, "Optimized for AI agents", and "Powered by AiProfile" when you switched that link on. Its small stylesheet loads only on pages with the answers.
* Deleting the plugin also removes the footer link.
* Dutch translation updated.

= 1.2.1 =
* The question form looks at home in any theme: a light card, a smaller heading, full-width fields in your theme's font, the checkbox on the first line of its label, and your theme's button style (block themes) or a matching solid button (classic themes). Works with dark themes.
* The form's small stylesheet loads only on pages with the answers.

= 1.2.0 =
* Show changes at once: AiProfile sends a signed message when you change an answer, and the page refreshes straight away (opt-in).
* Questions from visitors: an optional form "Is your question not here?" under the answers (opt-in).
* AI access check: warns when robots.txt blocks AI crawlers or search engines, with a one-click fix for the robots.txt WordPress makes.
* llms.txt for your business (opt-in).
* LocalBusiness structured data from your AiProfile, on the answers page or every page, skipped when an SEO plugin already describes your business.
* The "Answers via AiProfile" link is now off by default; switched on, it is a normal link.
* Dutch translation updated.

= 1.1.1 =
* Connecting reuses a page that already held the shortcode and makes it show the connected profile: a profile named in that shortcode is removed (taal, titel and jsonld stay).
* Connecting clears the cached answers and the page cache, so the page shows the new profile at once.

= 1.1.0 =
* The answers are rendered on the server, into the page's HTML, with the FAQPage JSON-LD. No JavaScript from AiProfile.
* Cached 10 minutes; the last good copy (7 days) is shown when AiProfile cannot be reached.
* No own heading by default; theme groups are h2 under the page title. `titel="ja"` brings the heading back.
* `taal` attribute; the default language follows the site.
* Setup screen: paste your AiProfile link, the plugin makes the page and puts it in your menu.
* Dutch translation included.

= 0.1.0 =
* First version: shortcode that loads the answers with JavaScript.

== Upgrade Notice ==

= 1.3.2 =
Sentence case and calmer spacing for your questions, and your changes now also reach pages served from a page cache.

= 1.3.1 =
A small fix in the AI access check; translations now come from translate.wordpress.org.

= 1.3.0 =
A badge above your answers, and a small footer link instead of a main menu item for new connections. Your current menu item stays until you move it.

= 1.2.1 =
A cleaner question form that follows your theme.

= 1.2.0 =
New, each optional: instant updates, a question form, an AI access check, llms.txt and business structured data. The "Answers via AiProfile" link is now off unless you switch it on.
