Add fixtures importer

This commit is contained in:
Brian Miyaji
2016-09-01 13:25:16 +10:00
parent c693b8a393
commit 1b31adf97e
3 changed files with 359 additions and 0 deletions

View File

@@ -34,6 +34,11 @@ class SP_Admin_Importers {
'description' => __( 'Import <strong>events</strong> from a csv file.', 'sportspress'),
'callback' => array( $this, 'events_importer' ),
),
'sp_fixture_csv' => array(
'name' => __( 'SportsPress Fixtures (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>fixtures</strong> from a csv file.', 'sportspress'),
'callback' => array( $this, 'fixtures_importer' ),
),
'sp_team_csv' => array(
'name' => __( 'SportsPress Teams (CSV)', 'sportspress' ),
'description' => __( 'Import <strong>teams</strong> from a csv file.', 'sportspress'),
@@ -69,6 +74,19 @@ class SP_Admin_Importers {
$importer->dispatch();
}
/**
* Add menu item
*/
public function fixtures_importer() {
$this->includes();
require 'importers/class-sp-fixture-importer.php';
// Dispatch
$importer = new SP_Fixture_Importer();
$importer->dispatch();
}
/**
* Add menu item
*/