-
Home
-
WP Map Editor
- Tips
How to Hide WP Map Editor Admin Menus
function plt_hide_wp_mapeditor_menus() {
//Hide "Map Editor".
remove_menu_page('map_editor');
//Hide "Settings → Map Editor".
remove_submenu_page('options-general.php', 'wme_settings');
//Hide "Locations".
remove_menu_page('edit.php?post_type=location');
//Hide "Locations → All Locations".
remove_submenu_page('edit.php?post_type=location', 'edit.php?post_type=location');
//Hide "Locations → Add New Location".
remove_submenu_page('edit.php?post_type=location', 'post-new.php?post_type=location');
//Hide "Locations → Maps".
remove_submenu_page('edit.php?post_type=location', 'edit-tags.php?taxonomy=map&post_type=location');
}
add_action('admin_menu', 'plt_hide_wp_mapeditor_menus', 11);
Where do I put this code?
How to Hide the "GPS Coordinates" Meta Box
function plt_hide_wp_mapeditor_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "GPS Coordinates" meta box.
remove_meta_box('wpme_maps_map', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_wp_mapeditor_metaboxes', 20);
How to Hide WP Map Editor Dashboard Widgets
function plt_hide_wp_mapeditor_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Activity" widget.
remove_meta_box('mapeditor_activity', 'dashboard', 'normal');
//Remove the "Shortcuts" widget.
remove_meta_box('mapeditor_shortcuts', 'dashboard', 'normal');
//Remove the "Status Info" widget.
remove_meta_box('mapeditor_statuses', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_wp_mapeditor_dashboard_widgets', 20);