=== Bulk Fixtures for SportsPress ===
Contributors: savvasha
Tags: sportspress, fixtures, events, sports, bulk
Requires at least: 5.6
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Quickly create multiple fixtures for SportsPress via a grid-based user interface.

== Description ==

**Bulk Fixtures for SportsPress** is an add-on plugin that extends [SportsPress](https://wordpress.org/plugins/sportspress/) with a powerful bulk fixture creation tool.

Instead of creating events one by one, this plugin provides a spreadsheet-like grid interface where you can quickly add multiple fixtures at once. Simply select a League and Season, then add as many fixtures as you need with Home Team, Away Team, Date, Time, and Match Day.

[youtube https://youtu.be/ZijaZOwA33c]

= Key Features =

* **Grid-Based Interface** - Add multiple fixtures in a spreadsheet-like table
* **Smart Row Cloning** - When adding a new row, Date, Time, and Match Day are automatically copied from the previous row
* **Searchable Team Dropdowns** - Searchable dropdowns for easy team selection
* **Team Filtering** - Teams are automatically filtered by the selected League and Season
* **Batch Processing** - Fixtures are saved in batches for reliable performance
* **Progress Tracking** - Real-time progress bar shows how many fixtures have been created
* **Error Handling** - Graceful error handling with detailed feedback

= Requirements =

* WordPress 5.6 or higher
* PHP 7.4 or higher
* SportsPress plugin (free or Pro version)

= How to Use =

1. Go to **SportsPress → Events → Bulk Fixtures** in your WordPress admin
2. Select a **League** from the dropdown
3. Select a **Season** from the dropdown
4. Teams will be automatically loaded based on your selection
5. Fill in the fixture details: Home Team, Away Team, Date, Time, and optionally Match Day
6. Click the **+** button to add more rows (values are cloned for faster entry)
7. Click **Create All Fixtures** to create all events

= Support =

For bug reports and feature requests, please visit the plugin's support forum on WordPress.org.

== Installation ==

= Automatic Installation =

1. Go to **Plugins → Add New** in your WordPress admin
2. Search for "Bulk Fixtures for SportsPress"
3. Click **Install Now** and then **Activate**
4. Make sure SportsPress is installed and activated

= Manual Installation =

1. Download the plugin ZIP file
2. Go to **Plugins → Add New → Upload Plugin**
3. Upload the ZIP file and click **Install Now**
4. Activate the plugin
5. Make sure SportsPress is installed and activated

= Requirements Check =

The plugin requires SportsPress to be installed and activated. If SportsPress is not active, you will see an admin notice prompting you to install it.

== Frequently Asked Questions ==

= Does this plugin work with SportsPress Pro? =

Yes, this plugin works with both the free version of SportsPress and SportsPress Pro.

= Can I create fixtures for multiple leagues at once? =

Currently, you can only create fixtures for one League/Season combination at a time. This is by design to ensure data accuracy and proper team filtering.

= What happens if an error occurs during saving? =

The plugin uses batch processing to save fixtures. If an error occurs with one fixture, it will be logged and the remaining fixtures will continue to be processed. You'll see a summary of any errors after the save process completes.

= Can I edit fixtures after creating them? =

Fixtures are created as standard SportsPress events. After creation, you can edit them like any other event from the Events list in SportsPress.

= How are teams filtered? =

Teams are filtered based on both the selected League AND Season. Only teams that are assigned to both the chosen League and Season will appear in the dropdowns.

= What is the Match Day field? =

The Match Day field is a text string (e.g., "Matchday 1", "Week 5", "Round 3") that helps organize fixtures. It's stored as post meta and displayed on the event page. This field is optional.

== Screenshots ==

1. The main Bulk Fixtures interface with League/Season selection
2. Adding multiple fixtures with the grid interface
3. Progress bar during fixture creation
4. Confirmation message after successful creation

== Changelog ==

= 2.0 =
* NEW: Venues can be selected per event
* FIX: Dropdown lists are not hidden anymore
* FIX: Leagues and Seasons were not shown hierarchically

= 1.0 =
* Initial release
* Grid-based fixture creation interface
* League and Season filtering
* Searchable team dropdowns
* Smart row cloning (Date, Time, Match Day)
* Batch processing with progress bar
* Error handling and validation
