Testing of this plugin has been temporarily suspended due to an error. It will automatically resume when a new plugin version is released.
function plt_hide_custom_contact_forms_menus() {
//Hide "Forms".
remove_menu_page('edit.php?post_type=ccf_form');
//Hide "Forms → Forms and Submissions".
remove_submenu_page('edit.php?post_type=ccf_form', 'edit.php?post_type=ccf_form');
//Hide "Forms → New Form".
remove_submenu_page('edit.php?post_type=ccf_form', 'post-new.php?post_type=ccf_form');
//Hide "Forms → Import".
remove_submenu_page('edit.php?post_type=ccf_form', 'http://127.0.0.1/wp-admin/import.php');
//Hide "Forms → Settings".
remove_submenu_page('edit.php?post_type=ccf_form', 'custom-contact-forms');
}
add_action('admin_menu', 'plt_hide_custom_contact_forms_menus', 11);
function plt_hide_custom_contact_forms_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Preview" meta box.
remove_meta_box('ccf-preview', $screen->id, 'normal');
//Hide the "At a Glance" meta box.
remove_meta_box('ccf-at-a-glance', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_custom_contact_forms_metaboxes', 20);