Skip to content

Instantly share code, notes, and snippets.

@webdev1001
Last active August 29, 2015 14:09
Show Gist options
  • Save webdev1001/325da4eab479e9c78fd9 to your computer and use it in GitHub Desktop.
Save webdev1001/325da4eab479e9c78fd9 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