Add fixtures importer
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user