=== Strata9 Listings ===
Contributors: strata9
Tags: oil and gas, mineral rights, listings, real estate, broker
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send your firm's oil and gas listings to Strata9 from WordPress, and show your live Strata9 listings on your own site.

== Description ==

Strata9 (strata9.exchange) is a map of oil and gas wells with a marketplace for mineral, royalty and lease listings. This plugin is for verified Strata9 broker firms.

* **Send listings to Strata9.** Add a listing from wp-admin with the well's API number (or its Strata9 id). Use Check to test it without saving anything, then Send. Every new listing goes to Strata9 review and goes live once approved.
* **Manage them.** See every listing and its status (draft, in review, live, closed), change the price or acreage, withdraw, close or send back for review.
* **Show them.** The `[strata9_listings]` shortcode shows your firm's live Strata9 listings on any page, each linked to its Strata9 page.

Rules set by Strata9, not the plugin: only verified firms can send listings, at most 25 listings wait for review at once, and the well must be on the Strata9 map.

== Installation ==

1. Upload the `strata9-listings` folder to `/wp-content/plugins/`, or install the zip from Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. In the Strata9 broker console (Listings page), the firm owner creates an API key.
4. In WordPress, go to Strata9 > Settings, paste the key and your firm page name, and save. Use Check the connection to confirm.

== Frequently Asked Questions ==

= Where is my API key kept? =

In this site's database (the WordPress options table). It is sent only to Strata9, over HTTPS, from your server. It is never shown again in wp-admin and never put in a page. Deleting the plugin deletes the key.

= Who can use the plugin screens? =

Users who can manage options (administrators).

= Can I show listings without a key? =

Yes. The shortcode needs only your firm page name; it reads the same public listings anyone can see on strata9.exchange.

= My site is not on WordPress. =

Strata9 also offers a one-line embed that works on Squarespace, Wix and hand-built sites. See https://strata9.exchange/api.

== Shortcode ==

`[strata9_listings]` uses the firm page name from Settings. Options: `firm="your-firm"`, `limit="12"` (1 to 50), `theme="dark"` or `theme="light"`. Listings are cached for 10 minutes.

== External services ==

This plugin connects to Strata9, the service it is made for, run by Strata9 Inc. Both connections below go to the Strata9 service at rmauuriohdctsqyytsdw.supabase.co and are made from your server, never from a visitor's browser.

* **Strata9 listings API** (functions path `listings-api`). Used when an administrator opens the Strata9 screens or sends, changes, closes, withdraws or relists a listing. Sent: the firm's API key and the listing details typed in the form (reference, well number, title, description, price, acreage, interest). Nothing about site visitors is sent.
* **Strata9 public listings** (REST path). Used when a page with the shortcode is shown and the 10-minute cache is empty. Sent: the firm page name. Received: the firm's live public listings. No visitor data is sent; the request comes from your server.

Strata9 terms of use: https://strata9.exchange/terms
Strata9 privacy policy: https://strata9.exchange/privacy

== Changelog ==

= 1.0.1 =
* Meets the WordPress.org plugin directory rules: longer unique prefixes, nonce checks, output escaping, license file.
* Tested with WordPress 7.1.

= 1.0.0 =
* First release: send, check, change, withdraw, close and relist listings; listings table; shortcode.

== Upgrade Notice ==

= 1.0.1 =
Directory review fixes. No settings change; your saved key is kept.
