From 77304ab3906d56178c04c04b4fa7c98c62f4e84c Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 19 Feb 2021 09:59:27 +0100 Subject: Formatting, no functional change. --- giglogadmin.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'giglogadmin.php') diff --git a/giglogadmin.php b/giglogadmin.php index 89d25c1..003c1fa 100644 --- a/giglogadmin.php +++ b/giglogadmin.php @@ -16,18 +16,23 @@ * License: AGPLv3 * License URI: https://www.gnu.org/licenses/agpl-3.0.txthttps://www.gnu.org/licenses/agpl-3.0.txt */ - - //function to show menus based on whether user is logged in or not. Giglog admin pages should only be visible for logged in users/can eventually be customized by role if needed +/* + * Show menus based on whether user is logged in or not. + * + * Giglog admin pages should only be visible for logged in users/can eventually + * be customized by role if needed + */ function my_wp_nav_menu_args( $args = '' ) { - -if( is_user_logged_in() ) { - $args['menu'] = 'Loggedusers'; -} else { - $args['menu'] = 'Notloggedusers'; -} + if ( is_user_logged_in() ) { + $args['menu'] = 'Loggedusers'; + } else { + $args['menu'] = 'Notloggedusers'; + } + return $args; } + add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); -- cgit v1.2.3