Add box score importer to events

This commit is contained in:
Brian Miyaji
2017-11-14 21:38:45 +11:00
parent 8d42d9ad1d
commit cf4dd17239
5 changed files with 249 additions and 24 deletions

View File

@@ -36,9 +36,14 @@ class SP_Admin_Importers {
),
'sp_fixture_csv' => array(
'name' => __( 'SportsPress Fixtures (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>fixtures</strong> from a csv file.', 'sportspress'),
'description' => __( 'Import <strong>upcoming events</strong> from a csv file.', 'sportspress'),
'callback' => array( $this, 'fixtures_importer' ),
),
'sp_event_performance_csv' => array(
'name' => __( 'SportsPress Box Score (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>event box scores</strong> from a csv file.', 'sportspress'),
'callback' => array( $this, 'event_performance_importer' ),
),
'sp_team_csv' => array(
'name' => __( 'SportsPress Teams (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>teams</strong> from a csv file.', 'sportspress'),
@@ -74,6 +79,19 @@ class SP_Admin_Importers {
$importer->dispatch();
}
/**
* Add menu item
*/
public function event_performance_importer() {
$this->includes();
require 'importers/class-sp-event-performance-importer.php';
// Dispatch
$importer = new SP_Event_Performance_Importer();
$importer->dispatch();
}
/**
* Add menu item
*/