-
Home
-
OpenCalendarKit
- Tips
How to Hide OpenCalendarKit Admin Menus
function plt_hide_open_calendar_kit_menus() {
//Hide "OpenCalendarKit".
remove_menu_page('open-calendar-kit');
//Hide "OpenCalendarKit → Opening Hours".
remove_submenu_page('open-calendar-kit', 'open-calendar-kit');
//Hide "OpenCalendarKit → Calendar".
remove_submenu_page('open-calendar-kit', 'open-calendar-kit-calendar');
//Hide "OpenCalendarKit → Event Notice".
remove_submenu_page('open-calendar-kit', 'open-calendar-kit-event-notice');
//Hide "OpenCalendarKit → Settings".
remove_submenu_page('open-calendar-kit', 'open-calendar-kit-settings');
}
add_action('admin_menu', 'plt_hide_open_calendar_kit_menus', 11);
Where do I put this code?
How to Hide the "Closed Day Details" Meta Box
function plt_hide_open_calendar_kit_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Closed Day Details" meta box.
remove_meta_box('openkit_closed_day_meta', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_open_calendar_kit_metaboxes', 20);