Browse Source

user roles activity log

windhamdavid 1 month ago
parent
commit
04ea45e999
1 changed files with 4 additions and 1 deletions
  1. 4 1
      functions.php

+ 4 - 1
functions.php

@@ -107,17 +107,20 @@ add_action( 'admin_menu', 'lps24_remove_admin_pages', 99 );
 function lps24_remove_admin_pages() {
   global $current_user;
   $user_id = get_current_user_id();
-  if($user_id != '0') {
+  if($user_id != '1') {
   	remove_menu_page('plugins.php');
     remove_menu_page('tools.php');
     remove_menu_page('options-general.php');
     remove_menu_page('gutenberg');
     remove_menu_page('users.php');
+    remove_menu_page('gf_edit_forms');
+    remove_menu_page('activity-log-page');
     remove_submenu_page('themes.php', 'themes-editor.php');
     remove_submenu_page('themes.php', 'customize.php?return=');
     remove_submenu_page('themes.php', 'themes.php');
     remove_submenu_page('themes.php', 'theme-editor.php');
     remove_submenu_page('themes.php', 'theme_options');
+    remove_submenu_page('gf_edit_forms', 'gf_edit_forms'); 
     remove_submenu_page('gf_edit_forms', 'gf_new_form');
     remove_submenu_page('gf_edit_forms', 'gf_export');
     remove_submenu_page('gf_edit_forms', 'gf_addons');