=== Sigora Widget ===
Contributors: sigorauk
Tags: propertyhive, real estate, estate agents, area guide, property listings
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Area maps and free co-branded area reports for every listing, on any WordPress site. Nine lenses you switch on or off. Property Hive ready.

== Description ==

Buyers want to know about the area before they book a viewing. Sigora answers on your own listing pages: schools, transport, health, sold prices, crime, broadband and more around a live map, every figure from an official UK source and styled to your brand. It works on any WordPress website: add the Sigora shortcode to your listing template once and it appears on every listing. Using Property Hive? It is even simpler: the widget adds itself to every property page, with no template edits.

**Start a free 30-day trial, no card needed: [sigora.uk/partner](https://sigora.uk/partner)**

= Works with any WordPress website =

* **Any WordPress site:** place the Sigora shortcode in your listing template once, with each listing's postcode or coordinates, and every listing gets its own area guide. The Sigora Widget block adds it to any single page in a couple of clicks.
* **Property Hive:** nothing to place. The widget adds itself to every property page, reads each home's location from Property Hive's own fields, and lets you hide it or narrow the lenses on any single listing.

= Nine lenses. You choose which ones show. =

* **Overview:** the whole area at a glance, on one map around the home.
* **Schools:** the nearest schools, with their results and the Sigora inspection summary.
* **Transport:** the nearest stations and their lines, and every bus stop within a mile.
* **Health:** GPs, pharmacies and dentists nearby, with inspection ratings and patient survey scores.
* **Prices:** HM Land Registry sold prices near the home, set against the council area and England, with five-year trends.
* **Crime:** the Sigora crime rating, with Police.uk figures set against the council area and England.
* **Amenities:** the cafés, restaurants, pubs, shops and everyday places within a walk.
* **Environment:** air quality, noise, flood risk and green space.
* **Connectivity:** Ofcom broadband and mobile coverage, with address-level broadband speed where Ofcom has a match.

= Set it up your way, once =

Every lens can be switched on or off for your website in the Sigora console, and the choice applies to every listing. Lead with Schools if families are your buyers; leave Crime off if it will not help.

* **Smart rules:** show Crime only where it is better than the national average, and show air quality only when it is acceptable.
* **Want a big map?** Untick the area summary for a full-width map.
* **Your look:** your brand colour, a light or dark theme, and compact or standard height.

= Free co-branded area reports =

Every plan includes co-branded PDF area reports for any address, not just your listings. Generate one from your console in seconds: ten print-ready A4 pages with your logo on the cover and the same official evidence inside. Leave it with a vendor after a valuation or add it to the viewing pack.

Paid plans include 1,000 reports a month and the free trial includes 15. There is no per-report charge. [See a sample report (PDF)](https://sigora.uk/sigora-sample-area-report.pdf).

= Why agents trust it =

* **Every figure names its source:** ONS, DfE, HM Land Registry, Police.uk, NHS, Ofcom and more.
* **No cookies, no visitor tracking:** the widget adds nothing your visitors need to consent to.
* **One install covers every listing:** no per-property work, ever.
* **Free for 30 days:** full access, no card needed.
* **Simple plans:** from £19.99 a month per website, sized by how many listings you have live, with every lens and area reports on every plan. [See plans](https://sigora.uk/partner/pricing).

Sigora is an independent product. Property Hive compatibility means the plugin detects Property Hive and places the widget on its property pages; Sigora is not affiliated with or endorsed by Property Hive.

== External services ==

This plugin relies on Sigora, a hosted third-party service, to render the
widget and supply its data. The plugin does not bundle a widget runtime and
cannot show anything without it.

What is sent, where, and when:

1. Hosted widget script. On every page where the widget is placed, the
visitor's browser loads the Sigora widget script from
`https://sigora.uk/widgets/v1/sigora-widget.js`, or from the bundle URL your
Sigora account returns during a connection test (currently
`https://widgets.sigora.uk/widgets/v1/sigora-widget.js`). As with any
externally hosted script, that request sends the visitor's IP address, user
agent, and the page URL as referrer.

2. Local-area data. The loaded script then requests area data from the Sigora
API at `https://sigora.uk`. It sends your public Sigora site key, your site's
origin, the page URL, and the listing context you configured for that
placement - latitude and longitude, or postcode, or place slug - together with
the listing reference. It does not send names, email addresses, or any other
personal data held by WordPress.

3. Connection test. When an administrator presses Test connection on the Sigora
admin page, WordPress makes one server-side request to
`https://sigora.uk/api/v1/public/widget/plugin/diagnostic` carrying your site
key and your site's origin. Nothing is sent at any other time.

4. Optional listing inventory. Only if you save a private inventory token,
Sigora reads your published Property Hive listing records from this site over an
authenticated REST route on its own schedule. Remove the saved token to revoke
that access. The token is never emitted in page HTML or in public REST output.

The service is provided by Sigora Insights Ltd (https://sigora.uk). Using this
plugin means accepting that provider's terms and privacy policy:

* Terms of service: https://sigora.uk/legal/b2b-tos
* Privacy policy: https://sigora.uk/privacy
* Data processing addendum: https://sigora.uk/legal/b2b-dpa

== Installation ==

1. Upload the `sigora-widget` folder to `/wp-content/plugins/`, or install the
   ZIP from the WordPress plugin screen.
2. Activate "Sigora Widget".
3. Open the new top-level "Sigora" menu in the WordPress admin sidebar.
4. Paste the site key from the Sigora partner console. If you do not have one,
   use the Start free trial link.
5. Run Test connection to check the site key, WordPress origin, plan state, and
   widget bundle URL.
6. If Property Hive is active, leave automatic injection enabled for property
   pages. Otherwise, add the Sigora Widget block or shortcode where the widget
   should appear.

Shortcode example (wire the postcode to the listing's own postcode field):

`[sigora_widget postcode="SW1A 1AA" listing_id="listing-123" mode="property"]`

Lat/lng is an alternative where listings carry coordinates
(`[sigora_widget lat="51.5074" lng="-0.1278" listing_id="listing-123"]`).
Lenses, layout, colours and theme come from your Sigora console, so they are
not set in the shortcode.

== Frequently Asked Questions ==

= Do I need Property Hive? =

No. The Sigora Widget block and shortcode work on any WordPress site. If you do
use Property Hive, the widget adds itself to your property pages and reads each
listing's location, so there is nothing to place by hand.

= Can I choose which lenses appear? =

Yes. Switch any of the nine lenses on or off for your website in the Sigora
console. The smart rules for Crime and air quality are set there too.

= Are the area reports really included? =

Yes. Every paid plan includes 1,000 co-branded area reports a month, and the
free trial includes 15. There is no per-report charge.

= What versions are supported? =

The compatibility floor is WordPress 6.0+, PHP 7.4+, and Property Hive 1.5+ when
Property Hive mode is active. The admin Plugin health view reports the installed
WordPress, PHP, and Property Hive versions.

= How does the plugin authenticate with Sigora? =

The plugin uses the public Sigora site key and the detected WordPress site
origin. There is no plugin API key and no separate identity stack.

= What does Test connection check? =

Test connection calls the Sigora plugin diagnostic endpoint with the configured
site key and detected site origin. It reports missing site key, invalid key,
blocked origin, inactive site, plan-derived lens availability, and bundle URL
state when the Sigora backend returns those fields.

= Why is the widget not showing on a Property Hive listing? =

Automatic injection uses Property Hive's single-property template hook, with a
standard `the_content` fallback for custom themes. If a theme bypasses both,
add the shortcode or Gutenberg block manually. The diagnostic log also records
missing-location and disabled-listing states for administrators.

= What location fields does Property Hive mode use? =

Sigora checks `_property_location_latitude` and `_property_location_longitude`
first, then RealEstateListing JSON-LD `geo.latitude` and `geo.longitude`. It also
keeps a postcode from common Property Hive postcode meta fields when coordinates
exist, because broadband and mobile evidence is postcode-keyed. A postcode is
the fallback location only when no usable coordinates are available.

= Where do I set the lenses, layout, colours and size? =

In your Sigora console, the single place to configure the widget's appearance.
The plugin only needs your site key; it does not duplicate those settings, so
nothing in WordPress can clash with your console. A single listing can still
narrow the lenses with the `_sigora_show` custom field (it cannot unlock lenses
that are not enabled for the site), and `_sigora_disable` skips injection for
that listing.

= How does the plugin get updates? =

Through WordPress, from the WordPress.org plugin directory. The plugin contains
no updater of its own and does not check any Sigora URL for new versions, so
update checks, the update notice and the auto-updates toggle all behave exactly
as they do for any other directory plugin. Builds installed from a direct ZIP
before the directory listing existed are replaced by installing the directory
version once, after which updates arrive automatically.

= What data leaves my site? =

See the External services section above. In short: visitors' browsers load the
widget from Sigora and Sigora returns local-area data for the listing location
you configured. Nothing personal held by WordPress is sent.

= Does the plugin track visitors? =

No. The plugin renders the hosted Sigora widget, which sets no cookies and loads
no analytics scripts. Widget events are aggregate runtime events tied to site
and listing context, not visitor identity.

== Screenshots ==

1. Overview: the area around the home on one map, with the nearest station, schools, GP, broadband and green space beside it.
2. Schools: the closest schools within a mile, each with its results and the Sigora inspection summary.
3. Transport, for a home in Camden: seven Tube stations within a mile, each with its lines, plus the closest bus stop and every stop on the map.
4. Health, for a home in Hackney: 21 GP practices within a mile, the nearest three rated Good, plus the nearest pharmacies and dentists.
5. Prices: HM Land Registry sold prices within a mile, set against the council area and England, with five-year trends by property type.
6. Crime: a clear Sigora crime rating of Lowest, with the rate near the home well below Cheshire East and England.
7. Amenities, for a home in Camden: 1.8k everyday places within a mile, from 586 restaurants and cafés to parks, pubs and food shops, with the closest essentials.
8. Environment: very clean air measured against the UK legal limit, a noise reading for road, rail and aircraft, low flood risk and plentiful green space.
9. Connectivity: gigabit broadband with a predicted 1,800 Mbps at this address, and strong mobile signal on all four networks.
10. Prefer a big map? Untick the area summary and the Overview becomes a full-width map.
11. Free co-branded area reports: ten print-ready A4 pages for any address, with your logo on the cover.
12. You are in control: switch each of the nine lenses on or off, set smart rules for Crime and air quality, and choose your colour, theme and height.
13. Made for phones too: the same widget becomes a single, easy-to-scroll column on mobile.
14. Simple set-up in WordPress: paste your site key, and Property Hive sites switch on automatic placement with one tick.
15. The Sigora Widget block in the block editor, for any WordPress site.

== Changelog ==

= 0.2.1 =
* Rename the plugin from "Sigora Widget for WordPress" to "Sigora Widget". The WordPress.org plugin directory does not permit "WordPress" in a plugin name. The folder, main file, text domain, settings and site key are unchanged.
* Document the Sigora external service in the readme: what is sent, when, and the provider's terms, privacy policy and data processing addendum.
* Accept `health` in per-listing lens overrides, so all nine lenses can be named in `_sigora_show` and in the block's lens field.
* List the nine lenses in the readme and replace the placeholder screenshots with real captures.

= 0.2.0 =
* Add a private, paginated Property Hive listing inventory that Sigora can synchronize without visitor traffic.
* Source publication and enablement remain separate from independent page verification.


= 0.1.0 =

* Adds the top-level Sigora admin page with site-key storage, Property Hive
  auto-inject toggle, widget height, diagnostic log, partner links, and Test
  connection (lenses, layout, colours and theme are set in the Sigora console).
* Adds generic shortcode and dynamic Gutenberg block rendering.
* Adds Property Hive detection, automatic property-page injection, coordinate
  extraction, listing ID fallback, `_sigora_show`, and `_sigora_disable`.
* Adds WordPress.org readme/assets, direct-download ZIP packaging, version
  compatibility matrix, GPL notice, and Plugin health diagnostics.

== Upgrade Notice ==

= 0.2.1 =

The display name changes to "Sigora Widget". No settings change and no reconfiguration is needed. The Health lens can now be named in per-listing lens overrides.

= 0.2.0 =

Adds optional private Property Hive listing inventory. Connect its token in Sigora settings; widget rendering and billing remain unchanged.

= 0.1.0 =

Initial Sigora Widget for WordPress release candidate for B2B widget delivery.
