Created
April 3, 2014 11:26
-
-
Save tjhole/9952679 to your computer and use it in GitHub Desktop.
WORDPRESS: Rename admin items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); | |
$menu = str_ireplace( 'Pages', 'Site Map', $menu ); | |
$menu = str_ireplace( 'Appearance', 'Menu', $menu ); | |
// return $menu array | |
return $menu; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment