-
Home
-
FormLift for Infusionsoft Web Forms
- Tips
How to Hide FormLift Admin Menus
function plt_hide_formlift_menus() {
//Hide "FormLift".
remove_menu_page('edit.php?post_type=infusion_form');
//Hide "FormLift → All Forms".
remove_submenu_page('edit.php?post_type=infusion_form', 'edit.php?post_type=infusion_form');
//Hide "FormLift → Add Form".
remove_submenu_page('edit.php?post_type=infusion_form', 'post-new.php?post_type=infusion_form');
//Hide "FormLift → Campaigns".
remove_submenu_page('edit.php?post_type=infusion_form', 'edit-tags.php?taxonomy=campaigns&post_type=infusion_form');
//Hide "FormLift → Licenses".
remove_submenu_page('edit.php?post_type=infusion_form', 'formlift_modules');
//Hide "FormLift → Settings".
remove_submenu_page('edit.php?post_type=infusion_form', 'formlift_settings_page');
}
add_action('admin_menu', 'plt_hide_formlift_menus', 11);
Where do I put this code?
How to Hide FormLift Meta Boxes
function plt_hide_formlift_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Infusionsoft Form" meta box.
remove_meta_box('infusion_meta', $screen->id, 'normal');
//Hide the "Form Settings" meta box.
remove_meta_box('formlift_form_settings', $screen->id, 'advanced');
//Hide the "Preview Form" meta box.
remove_meta_box('infusion_preview', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_formlift_metaboxes', 20);