-
Home
-
OSM – OpenStreetMap
- Tips
How to Hide OSM Admin Menus
function plt_hide_osm_menus() {
//Hide the "Settings → OSM" menu.
remove_submenu_page('options-general.php', 'osm.php');
}
add_action('admin_menu', 'plt_hide_osm_menus', 11);
Where do I put this code?
How to Hide the "WP OSM Plugin shortcode generator" Meta Box
function plt_hide_osm_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "WP OSM Plugin shortcode generator" meta box.
remove_meta_box('osm-sc-meta', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_osm_metaboxes', 20);