=== A/GEO Schema Manager ===
Contributors: marketgrowth
Tags: aeo, geo, schema, json-ld, structured data
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add JSON-LD schema, meta tags and link tags to the head of your site for AEO and GEO. Use one set for all pages and one set for each entry.

== Description ==

A/GEO adds structured data inside the <head> tag of your site. This data helps AI answer engines and generative engines read your content. AEO means answer engine optimization. GEO means generative engine optimization.

A/GEO accepts three kinds of items:

* JSON-LD blocks: <script type="application/ld+json">. A/GEO checks that the JSON is valid. Then it encodes the JSON again and escapes it before output.
* Meta tags with a name or property attribute and a content attribute, for example description, robots and Open Graph tags.
* Link tags with an http or https address and one of these rel values: canonical, alternate, author, license, me, shortlink, preconnect, dns-prefetch, preload or prefetch.

A/GEO removes all other code when you save, for example other scripts, styles, frames and event attributes. A/GEO also checks the code again before output. A/GEO does not run custom JavaScript, PHP or CSS.

Global Schema Code:

* A/GEO adds this code to the head of every page on the site.
* Use it for schema that applies to the full site, for example Organization or LocalBusiness.
* An on and off switch stops the code without deleting it.

A/GEO - Schema and Meta Tags box:

* The box shows on the edit screen of each page, post and custom post type.
* A/GEO adds the code to the head of that entry only.
* "Insert placeholder" adds a starter JSON-LD block for the entry.
* Clear "Active" to keep the code stored without running it.
* An option stops the Global Schema Code on that entry.
* Priority sets the position in the head. Lower numbers print earlier. The default is 10.

Dashboard (Tools > A/GEO):

* The first card, No. of contents, shows the number of published entries with active A/GEO code.
* The second card, Global coverage, shows the percentage of published entries that get the Global Schema Code, with two decimal places.
* Other cards show counts of published entries by type.
* Select a card to change the list below the cards:
  * No. of contents: published entries with active A/GEO code. This is the default list.
  * Published: all published entries.
  * Pages, Posts and Custom post types: all entries of that type. Filter by All, Published or Draft.
* Filter by type in the Type column header. Sort by title, type, publish date or update date. Search titles and content.
* Each row shows the Global Schema Code status and the entry code status.
* Each row has a "Test Rich Results Schema" link. It opens the Google Rich Results Test.
* The Global Schema Code section is collapsed by default.
* Both code editors check JSON-LD for errors. They also list the items that A/GEO removes when you save.

= Security =

A/GEO does these things to keep your site safe:

* A/GEO does not print raw code. It keeps only JSON-LD blocks, meta tags and link tags.
* A/GEO builds each tag again from escaped values. It encodes JSON-LD again and escapes the characters <, > and &. The data cannot close the script tag.
* A/GEO checks the code two times: when you save, and again before output. The second check uses wp_kses with a short list of allowed tags and attributes.
* Link tags accept only http and https addresses. A/GEO removes other address types, for example javascript: and data:.
* All forms use WordPress nonces. A/GEO checks the user capability before it saves data.
* A/GEO does not send data to other services. It does not load files from other servers.
* When you delete the plugin, A/GEO deletes its settings and the data that it stored on entries.

Security review cadence:

* Before each release, we run Plugin Check and the WordPress Coding Standards security checks. We also test the sanitizer with a set of attack inputs, for example script injection, event attributes and unsafe addresses.
* After each major WordPress release, we test A/GEO on that release. Then we update "Tested up to".
* Each quarter, we review the list of allowed tags and attributes.
* When we confirm a security issue, we release a fix as soon as possible. The changelog marks these fixes with "Security:".

Report a security issue:

* Do not post security issues in the public support forum.
* Use the security form at https://ageoagency.com/contact/?type=security. In "I am", select "Reporting a security issue for A/GEO plugin".
* Include the A/GEO version, the WordPress version and the steps to reproduce the issue.
* We reply within 3 business days.

== External services ==

A/GEO does not connect to external services on its own.

The dashboard shows a "Test Rich Results Schema" link for each published entry. The link opens the Google Rich Results Test in a new tab. When you click the link, your browser sends the address of that entry to Google. A/GEO sends no data unless you click the link.

* Service: Google Rich Results Test, https://search.google.com/test/rich-results
* Google Terms of Service: https://policies.google.com/terms
* Google Privacy Policy: https://policies.google.com/privacy

== Installation ==

1. Go to Plugins > Add New > Upload Plugin.
2. Select ageo-schema-manager.zip and click Install Now.
3. Click Activate.
4. Go to Tools > A/GEO.

== Frequently Asked Questions ==

= Who can edit the code? =

Users with the manage_options capability can open the dashboard and edit the Global Schema Code. Users who can edit an entry can edit the A/GEO - Schema and Meta Tags box for that entry.

= Can I add tracking scripts or custom JavaScript? =

No. A/GEO accepts only JSON-LD, meta tags and link tags. It removes other code when you save.

= Where does the code appear on the page? =

Inside <head>. Comments mark each block: <!-- A/GEO global schema code --> and <!-- A/GEO entry code -->.

= Can developers extend A/GEO? =

Yes. Filters:

* ageo_modules: add views to the A/GEO admin page. Each view gets a link in the sidebar.
* ageo_post_types: change the post types that A/GEO lists and supports.
* ageo_global_code: change the Global Schema Code before output.
* ageo_entry_code: change the entry code before output.
* ageo_should_output_global_code: turn the Global Schema Code on or off for a request.
* ageo_dashboard_per_page: rows per page in the content table (default 25).

== Changelog ==

= 1.0.3 =
* Change: the plugin folder, main file and text domain are now ageo-schema-manager, to match the plugin name.
* Change: when you delete the plugin, A/GEO keeps its data if another copy of A/GEO is still installed.

= 1.0.2 =
* Change: the plugin name is now A/GEO Schema Manager.

= 1.0.1 =
* Change: notices from WordPress and other plugins do not show on the A/GEO dashboard. A/GEO messages still show.

= 1.0.0 =
* First release.
* Global Schema Code: one set of JSON-LD, meta tags and link tags for every page. An on and off switch.
* A/GEO - Schema and Meta Tags box on pages, posts and custom post types: entry code, Active option, option to stop the Global Schema Code, and priority.
* Sanitizer: keeps only JSON-LD, meta tags and link tags. Checks on save and again before output. Lists the items that it removes.
* Dashboard at Tools > A/GEO: summary cards that open filtered lists, a content table with type and status filters, search and sorting, and a Test Rich Results Schema link for each published entry.
