-
Home
-
Fakturo
- Tips
How to Hide Fakturo Admin Menus
function plt_hide_fakturo_menus() {
//Hide "Dashboard → Fakturo News".
remove_submenu_page('index.php', 'fakturo-about');
//Hide "Plugins → Fakturo Add-ons".
remove_submenu_page('plugins.php', 'fakturo');
//Hide "Fakturo".
remove_menu_page('fakturo_dashboard');
//Hide "Fakturo → Dashboard".
remove_submenu_page('fakturo_dashboard', 'fakturo_dashboard');
//Hide "Fakturo → Providers".
remove_submenu_page('fakturo_dashboard', 'edit.php?post_type=fktr_provider');
//Hide "Fakturo → Add Provider".
remove_submenu_page('fakturo_dashboard', 'post-new.php?post_type=fktr_provider');
//Hide "Fakturo → Clients".
remove_submenu_page('fakturo_dashboard', 'edit.php?post_type=fktr_client');
//Hide "Fakturo → Add Client".
remove_submenu_page('fakturo_dashboard', 'post-new.php?post_type=fktr_client');
//Hide "Fakturo → Reports".
remove_submenu_page('fakturo_dashboard', 'fakturo_reports');
//Hide "Fakturo → Settings".
remove_submenu_page('fakturo_dashboard', 'fakturo-settings');
//Hide "Fakturo → Extensions".
remove_submenu_page('fakturo_dashboard', 'plugins.php?page=fakturo');
//Hide "Sales".
remove_menu_page('edit.php?post_type=fktr_sale');
//Hide "Sales → Invoices".
remove_submenu_page('edit.php?post_type=fktr_sale', 'edit.php?post_type=fktr_sale');
//Hide "Sales → Add Invoice".
remove_submenu_page('edit.php?post_type=fktr_sale', 'post-new.php?post_type=fktr_sale');
//Hide "Sales → Receipts".
remove_submenu_page('edit.php?post_type=fktr_sale', 'edit.php?post_type=fktr_receipt');
//Hide "Sales → Add New Receipt".
remove_submenu_page('edit.php?post_type=fktr_sale', 'post-new.php?post_type=fktr_receipt');
//Hide "Sales → Checks".
remove_submenu_page('edit.php?post_type=fktr_sale', 'edit-tags.php?taxonomy=fktr_check');
//Hide "Products".
remove_menu_page('edit.php?post_type=fktr_product');
//Hide "Products → Products".
remove_submenu_page('edit.php?post_type=fktr_product', 'edit.php?post_type=fktr_product');
//Hide "Products → Add Product".
remove_submenu_page('edit.php?post_type=fktr_product', 'post-new.php?post_type=fktr_product');
//Hide "Products → Category".
remove_submenu_page('edit.php?post_type=fktr_product', 'edit-tags.php?taxonomy=fktr_category');
//Hide "Products → Models".
remove_submenu_page('edit.php?post_type=fktr_product', 'edit-tags.php?taxonomy=fktr_model');
}
add_action('admin_menu', 'plt_hide_fakturo_menus', 100);
Where do I put this code?
How to Hide the "Fakturo - Sales Summary" Dashboard Widget
function plt_hide_fakturo_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Fakturo - Sales Summary" widget.
remove_meta_box('fktr_dashboard_widget_sale_summary', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_fakturo_dashboard_widgets', 20);