summaryrefslogtreecommitdiffstats
path: root/giglogadmin.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-03-11 13:15:03 +0100
committerHarald Eilertsen <haraldei@anduin.net>2021-03-11 13:20:17 +0100
commitfe57b461edbdcb5173c1b3096a7936a89ebc250f (patch)
tree4b15c4b8bb755feb0bc68383013ea348aa5c7281 /giglogadmin.php
parent69d03fd9f451db8da8223119c363d2d5b982f273 (diff)
downloadgigologadmin-fe57b461edbdcb5173c1b3096a7936a89ebc250f.tar.gz
gigologadmin-fe57b461edbdcb5173c1b3096a7936a89ebc250f.tar.bz2
gigologadmin-fe57b461edbdcb5173c1b3096a7936a89ebc250f.zip
Fix helpfiles include.
- Include for photographers help was missing. - Fix callable for adding help files. - Make add_help_files method static - Some whitespace fixes.
Diffstat (limited to 'giglogadmin.php')
-rw-r--r--giglogadmin.php42
1 files changed, 22 insertions, 20 deletions
diff --git a/giglogadmin.php b/giglogadmin.php
index 4e38a3f..d610fe8 100644
--- a/giglogadmin.php
+++ b/giglogadmin.php
@@ -27,6 +27,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
require_once __DIR__ . '/includes/admin/views/giglog_import_gigs.php';
require_once __DIR__ . '/includes/admin/helpfiles/instrunctions.php';
require_once __DIR__ . '/includes/admin/helpfiles/instr_reviewers.php';
+ require_once __DIR__ . '/includes/admin/helpfiles/instr_photog.php';
class GiglogAdmin_Plugin
{
@@ -38,7 +39,8 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
add_shortcode('giglog_photog', 'giglogadmin_photographers');
add_action( 'admin_menu', array( 'GiglogAdmin_Plugin', 'add_admin_pages' ));
- add_action( 'admin_menu', 'add_help_pages');
+ add_action( 'admin_menu', array( 'GiglogAdmin_Plugin', 'add_help_pages' ));
+
add_filter( 'wp_nav_menu_args', array( 'GiglogAdmin_Plugin', 'nav_menu_args' ));
}
@@ -73,34 +75,34 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
add_action( 'load-' . $import_hook, array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
}
- function add_help_pages() {
+
+ static function add_help_pages() {
add_menu_page(
- "Help for ET users", // Page title
- "Help for ET users", // Menu title
+ "Help for ET users", // Page title
+ "Help for ET users", // Menu title
"upload_files", // Will show for users with this capability
- "helpfiles", // menu slug
+ "helpfiles", // menu slug
array( 'Instructions_Page', 'render_instr_html' ), // callable
'dashicons-tickets-alt', // Icon url
10); // Position, just below 'Media'
-
- add_submenu_page(
- "helpfiles", // parent slug
- "Reviewer help files", // page title
- "Reviewer help files", // menu title
+
+ add_submenu_page(
+ "helpfiles", // parent slug
+ "Reviewer help files", // page title
+ "Reviewer help files", // menu title
"upload_files", // required capability
"reviewer_help", // menu slug
array( 'Instructions_Reviewers', 'render_instr_rev_html' )); // callable
-
- add_submenu_page(
- "helpfiles", // parent slug
- "Photogalleries help files", // page title
- "Photogalleries help files", // menu title
- "upload_files", // required capability
- "photog_help", // menu slug
- array( 'Instructions_Photogs', 'render_instr_photo_html' )); // callable
-
+
+ add_submenu_page(
+ "helpfiles", // parent slug
+ "Photogalleries help files", // page title
+ "Photogalleries help files", // menu title
+ "upload_files", // required capability
+ "photog_help", // menu slug
+ array( 'Instructions_Photogs', 'render_instr_photo_html' )); // callable
}
-
+
/*
* Show menus based on whether user is logged in or not.
*