-
Home
-
XHTheme AI Toolbox
- Tips
How to Hide XHTheme AI Toolbox Admin Menus
function plt_hide_xhtheme_ai_toolbox_menus() {
//Hide "AI Toolbox".
remove_menu_page('xhtheme-ai-toolbox');
//Hide "AI Toolbox → Feature Settings".
remove_submenu_page('xhtheme-ai-toolbox', 'xhtheme-ai-toolbox');
//Hide "AI Toolbox → Task Queue".
remove_submenu_page('xhtheme-ai-toolbox', 'xhtheme-ai-queue');
//Hide "AI Toolbox → Automation Settings".
remove_submenu_page('xhtheme-ai-toolbox', 'xhtheme-ai-automate');
//Hide "AI Toolbox → AI Comment Assistant".
remove_submenu_page('xhtheme-ai-toolbox', 'xhtheme-ai-interact');
//Hide "AI Toolbox → Setup Wizard".
remove_submenu_page('xhtheme-ai-toolbox', 'xhtheme-ai-wizard');
}
add_action('admin_menu', 'plt_hide_xhtheme_ai_toolbox_menus', 11);
Where do I put this code?
How to Hide XHTheme AI Toolbox Meta Boxes
function plt_hide_xhtheme_ai_toolbox_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "AI Excerpt" meta box.
remove_meta_box('xhtheme_ai_excerpt_metabox', $screen->id, 'side');
//Hide the "Join AI Queue" meta box.
remove_meta_box('xhaitoolbox_aitasks_metabox', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_xhtheme_ai_toolbox_metaboxes', 20);