=== RaceDay Model ===
Contributors: racerpacer
Tags: events, race, running, trail, calendar
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The data behind a race-weekend website: an event post type, terrain and country taxonomies, and the fields for races, results and photos.

== Description ==

One event post is one edition of one race weekend, for example the 2026 running. It carries the whole life of the event: the announcement, the races, and afterwards the results links, weather and photos.

* **Post type** `rd_event`. The archive is at `/races/`, single events at `/events/{slug}/`, and everything is in the REST API at `/wp-json/wp/v2/events`.
* **Taxonomies** for terrain, country and continent, which drive the race finder's filters.
* **Fields** (ACF Pro, as Local JSON in `acf-json/`): event details (dates, location, coordinates, total climb, entry link, capacity), a repeater of races (distance, gain and loss, highest point, technical grade 1 to 5, GPX file, map links, kit list), and the aftermath (starters and finishers, weather, results links, gallery, videos).
* `.gpx` uploads are allowed for the race routes.

This plugin holds data only. Pair it with RaceDay Features, which draws it, and a theme such as Wildstride, which styles it.

== Installation ==

1. Install and activate **ACF Pro**. This plugin needs it; the free version of ACF will not work.
2. Upload `raceday-model` to `/wp-content/plugins/` and activate it.
3. In ACF → Field Groups, press **Sync available** if ACF offers it, so the field groups load from `acf-json/`.
4. Settings → Permalinks → Save, so `/races/` and `/events/` work.
5. Optional: load the demo calendar (12 upcoming weekends, 3 past editions with results) with WP-CLI:
   `wp eval-file wp-content/plugins/raceday-model/seed/seed-events.php`
   It's safe to run more than once.

== Frequently Asked Questions ==

= Does it need ACF Pro? =

Yes. The field groups use ACF Pro field types (repeaters and the gallery).

= What happens to my events if I delete the plugin? =

They stay in the database. Reinstall the plugin and they're back. Delete them from the Events screen first if you want them gone.

== External services ==

The plugin makes no outside requests while your site runs.

The optional demo seed command (above) downloads its sample photos from Unsplash (`images.unsplash.com`), once, when you run it. Those photos are under the Unsplash Licence (https://unsplash.com/license), not the GPL. Unsplash's privacy policy: https://unsplash.com/privacy

== Changelog ==

= 0.1.0 =
* First public release.
