diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-02-19 09:47:50 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-02-19 09:47:50 +0100 |
commit | f58ea916f7a6ab26c4aacc3674442aa963829abd (patch) | |
tree | deece78bc8d3f1d91c541ac8c542f2e86d564e1e /giglogadmin.php | |
parent | 398806c8695c6d08fffc9561db1a1406f2367a43 (diff) | |
parent | bb7b1958b1171567694218378968fe42e43b1294 (diff) | |
download | gigologadmin-f58ea916f7a6ab26c4aacc3674442aa963829abd.tar.gz gigologadmin-f58ea916f7a6ab26c4aacc3674442aa963829abd.tar.bz2 gigologadmin-f58ea916f7a6ab26c4aacc3674442aa963829abd.zip |
Merge remote-tracking branch 'andrea/andreaschanges' into dev
Diffstat (limited to 'giglogadmin.php')
-rw-r--r-- | giglogadmin.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/giglogadmin.php b/giglogadmin.php index 54d8694..89d25c1 100644 --- a/giglogadmin.php +++ b/giglogadmin.php @@ -16,6 +16,20 @@ * 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 + +function my_wp_nav_menu_args( $args = '' ) { + +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' ); + if ( !class_exists( 'GiglogAdmin_Plugin' ) ) { require_once __DIR__ . '/includes/public/shortcodes/giglog_bands.php'; |