-
Home
-
Dashi
- Tips
How to Hide Dashi Admin Menus
function plt_hide_dashi_menus() {
//Hide "Settings → Dashi Framework".
remove_submenu_page('options-general.php', 'dashi_options');
//Hide "Page Part".
remove_menu_page('edit.php?post_type=pagepart');
//Hide "Page Part → Page Part".
remove_submenu_page('edit.php?post_type=pagepart', 'edit.php?post_type=pagepart');
//Hide "Page Part → add Page Part".
remove_submenu_page('edit.php?post_type=pagepart', 'post-new.php?post_type=pagepart');
}
add_action('admin_menu', 'plt_hide_dashi_menus', 11);
Where do I put this code?
How to Hide Dashi Dashboard Widgets
function plt_hide_dashi_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Unseen Contents List" widget.
remove_meta_box('dashi_list_unseen_content', 'dashboard', 'normal');
//Remove the "CSVExport" widget.
remove_meta_box('dashi_list_posttype_to_gen_csv', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_dashi_dashboard_widgets', 20);