diff options
-rw-r--r-- | giglogadmin.php | 13 | ||||
-rw-r--r-- | includes/admin/views/giglog_import_gigs.php | 25 |
2 files changed, 36 insertions, 2 deletions
diff --git a/giglogadmin.php b/giglogadmin.php index 091cdcf..0ebaa99 100644 --- a/giglogadmin.php +++ b/giglogadmin.php @@ -25,6 +25,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { require_once __DIR__ . '/includes/public/shortcodes/giglog_photographers.php'; require_once __DIR__ . '/includes/public/shortcodes/giglog_process_files.php'; require_once __DIR__ . '/includes/admin/views/giglog_admin_page.php'; + require_once __DIR__ . '/includes/admin/views/giglog_import_gigs.php'; class GiglogAdmin_Plugin { @@ -51,14 +52,22 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { * menu. Other subpages will come later. */ static function add_admin_pages() { - add_menu_page( - "Giglog", // Page title + $top = add_menu_page( + "Giglog admin", // Page title "Giglog", // Menu title "upload_files", // Will show for users with this capability "giglog", // menu slug array( 'GiglogAdmin_AdminPage', 'render_html' ), // callable 'dashicons-tickets-alt', // Icon url 11); // Position, just below 'Media' + + add_submenu_page( + "giglog", // parent slug + "Import gigs", // page title + "Import gigs", // menu title + "upload_files", // required capability + "giglog_import", // menu slug + array( 'GiglogAdmin_ImportGigsPage', 'render_html' )); // callable } /* diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php new file mode 100644 index 0000000..953fa62 --- /dev/null +++ b/includes/admin/views/giglog_import_gigs.php @@ -0,0 +1,25 @@ +<?php +/* + Copyright (C) 2021 Harald Eilertsen, Andrea Chirulescu + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { + class GiglogAdmin_ImportGigsPage { + static function render_html() { + echo '<div class="wrap"><h1>Let\'s import some gigs!</h1></div>'; + } + } +} |