=== CrashCount Crash Finder Shortcode ===
Contributors: crashcountnyc
Tags: crash, traffic safety, map, nyc
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add CrashCount embeds to WordPress using shortcodes or Gutenberg blocks.

== Description ==

This plugin provides editor-friendly CrashCount embeds for publishers:

1. Crash Finder search widget.
2. NYC council map tout (static image by default, optional iframe mode).
3. Thin crashcounter strip for citywide and geographies.
4. Saved Crash Finder results card.

The plugin also registers Gutenberg blocks that wrap the same server-side rendering logic as shortcodes, so outputs stay in sync.

Public docs:
https://crashcountnyc.com/about/embeds/

== Installation ==

1. In WordPress admin, go to Plugins > Add New Plugin > Upload Plugin.
2. Upload `crashcount-crashfinder-shortcode.zip`.
3. Activate the plugin.
4. Add a shortcode or block to a page/post.

== Usage ==

Shortcodes:

* `[crashcount_crashfinder]`
* `[crashcount_council_map_tout]`
* `[crashcount_crashcounter_strip layer="citywide" id="nyc"]`

V2 (parked):
* `[crashcount_find_results url="https://crashcountnyc.com/find/?sid=..."]`

Gutenberg blocks:

* `CrashCount: Crash Finder`
* `CrashCount: Council Map Tout`
* `CrashCount: CrashCounter Strip`

V2 (parked):
* `CrashCount: Find Results Card`

== External Services ==

This plugin connects to CrashCount services to render embeds and provide live data.

Service domains:

* `https://crashcountnyc.com`
* `https://mk1mrx11pg.execute-api.us-east-1.amazonaws.com`

When requests are made:

* When a page containing CrashCount shortcodes/blocks is rendered, visitor browsers request scripts, styles, images, and JSON summary data from CrashCount.
* When a visitor uses Crash Finder search, the typed query is sent to CrashCount endpoints to return location suggestions and open the selected Crash Finder page.
* When saved results cards are used, `sid`/`url` parameters are sent to fetch the matching summary card.

Data sent:

* Standard web request metadata (for example IP address, user agent, and referrer) is transmitted by the browser.
* Search text entered by the visitor for Crash Finder lookup.
* Embed parameters (for example layer/id/window/sid/url) and source/UTM attribution parameters used for link routing analytics.

Service policies:

* Privacy Policy: `https://crashcountnyc.com/privacy/`
* Terms of Service: `https://crashcountnyc.com/terms/`

== Changelog ==

= 0.5.0 =
* Added crashcounter strip shortcode and Gutenberg block.
* Added saved Crash Finder results shortcode and Gutenberg block (parked for V2 rollout).
* Added Gutenberg wrappers for existing shortcodes.
* Added council map tout styling and metadata support improvements.
