Skip to content

Instantly share code, notes, and snippets.

@digiltd
Created June 13, 2014 10:22
Show Gist options
  • Save digiltd/537d5e95da9803cf41a0 to your computer and use it in GitHub Desktop.
Save digiltd/537d5e95da9803cf41a0 to your computer and use it in GitHub Desktop.
<?php
add_filter('gettext', 'rename_admin_menu_items');
add_filter('ngettext', 'rename_admin_menu_items');
/**
* Replaces wp-admin menu item names
*
* @author Daan Kortenbach
*
* @param array $menu The menu array.
*
* @return $menu Menu array with replaced items.
*/
function rename_admin_menu_items( $menu ) {
// $menu = str_ireplace( 'original name', 'new name', $menu );
$menu = str_ireplace( 'Dashboard', 'Home', $menu );
// return $menu array
return $menu;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment