summaryrefslogtreecommitdiffstats
path: root/giglogadmin.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-02-23 11:58:20 +0100
committerHarald Eilertsen <haraldei@anduin.net>2021-02-23 11:58:20 +0100
commitb2784f4bcb9724786dde19b31304f86918f6fb95 (patch)
treedbc4f065ffe3b340a2f56bfd1aa94a92bc3255ad /giglogadmin.php
parentd7f1eccafc8013b20a5f23e5b5c97df458ea6081 (diff)
downloadgigologadmin-b2784f4bcb9724786dde19b31304f86918f6fb95.tar.gz
gigologadmin-b2784f4bcb9724786dde19b31304f86918f6fb95.tar.bz2
gigologadmin-b2784f4bcb9724786dde19b31304f86918f6fb95.zip
Add a sub page for importing gigs in admin.
Just an emtpy placeholder for now.
Diffstat (limited to 'giglogadmin.php')
-rw-r--r--giglogadmin.php13
1 files changed, 11 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
}
/*