summaryrefslogtreecommitdiffstats
path: root/giglogadmin.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-08 20:28:00 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-08 20:28:00 +0200
commit88de0f55d7499009f0f316262757e70385d43ce5 (patch)
tree201e0f5b6e241fd9e19463a5efea5995e790acb6 /giglogadmin.php
parent00b7f2f443a29f345461b00b617bf0f155e938f1 (diff)
downloadgigologadmin-88de0f55d7499009f0f316262757e70385d43ce5.tar.gz
gigologadmin-88de0f55d7499009f0f316262757e70385d43ce5.tar.bz2
gigologadmin-88de0f55d7499009f0f316262757e70385d43ce5.zip
Psalm fixes
Diffstat (limited to 'giglogadmin.php')
-rw-r--r--giglogadmin.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/giglogadmin.php b/giglogadmin.php
index d71496b..c8ae9b0 100644
--- a/giglogadmin.php
+++ b/giglogadmin.php
@@ -82,7 +82,11 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
"giglog_import", // menu slug
array( 'GiglogAdmin_ImportGigsPage', 'render_html' )); // callable
- add_action( 'load-' . $import_hook, array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
+ if ($import_hook !== false) {
+ add_action(
+ 'load-' . $import_hook,
+ array( 'GiglogAdmin_ImportGigsPage', 'submit_form' ) );
+ }
wp_register_style( 'css_style', plugins_url( '/includes/css/main.css', __FILE__ ) );
wp_enqueue_style('css_style');
@@ -121,7 +125,7 @@ if ( !class_exists( 'GiglogAdmin_Plugin' ) ) {
* Giglog admin pages should only be visible for logged in users/can eventually
* be customized by role if needed
*/
- static function nav_menu_args( $args = '' ) {
+ static function nav_menu_args( array $args = [] ) : array {
if ( is_user_logged_in() ) {
$args['menu'] = 'Loggedusers';
} else {