-
Home
-
Push Notifications for WP – Self Hosted Web Push Notifications
- Tips
How to Hide Push Notifications for WP - Self Hosted Web Push Notifications Admin Menus
function plt_hide_push_notification_menus() {
//Hide the "Push Notifications" menu.
remove_menu_page('push-notification');
//Hide the "Push Notifications → Settings" menu.
remove_submenu_page('push-notification', 'push-notification');
//Hide the "Push Notifications → Upgrade To Premium" menu.
remove_submenu_page('push-notification', 'javasctipt:void(0);');
}
add_action('admin_menu', 'plt_hide_push_notification_menus', 11);
Where do I put this code?
How to Hide the "Disable push notification on current post?" Meta Box
function plt_hide_push_notification_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Disable push notification on current post?" meta box.
remove_meta_box('send_push_on_current_post', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_push_notification_metaboxes', 20);