Skip to content

Instantly share code, notes, and snippets.

@akumaf
Created October 17, 2016 10:09
Show Gist options
  • Save akumaf/1598d3d7300ea4e79b7a858d69dd9791 to your computer and use it in GitHub Desktop.
Save akumaf/1598d3d7300ea4e79b7a858d69dd9791 to your computer and use it in GitHub Desktop.
<?php
/**
* Remove or change a duplicate submenu in WordPress
*
* @author H.F. Kluitenberg
*
* See http://arevico.com/remove-duplicate-sub-menu-in-wordpress on how to use this script
*/
add_action('admin_init', 'nameSubMenu') ;
/**
* Change the submenu name if it exists
* replace 'arvbb-biblio' with the slug of the parent menu (the one you registered)
*/
function nameSubMenu(){
global $submenu;
if ( isset( $submenu['arvbb-biblio'], $submenu['arvbb-biblio'][0], $submenu['arvbb-biblio'][0][0] ) )
$submenu['arvbb-biblio'][0][0] = 'Global Settings';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment