I am really confused at this point. I can not figure it out how to rename Edit My Profile
link in the admin backend.
How can that be done?
I am really confused at this point. I can not figure it out how to rename Edit My Profile
link in the admin backend.
How can that be done?
You must be logged in to post a comment.
You could use the
wp_before_admin_bar_render
hook. You can play with code samples on the Codex page by putting them in your theme’sfunctions.php
.First off you can try examining the object by outputting its contents with
print_r()
, and you’ll see all the familiar items. I would probably useremove_menu
helper and then add a new one with the modified link title, just to keep things clean.The downside of this approach is that the new item will not show up in the same spot.
If you want to alter strings from core code in the backend, a nifty way to get at ’em is by means of the
gettext
filter.This filter is applied by every internationalization function, i.e. for every translatable string.
Even if your goal is renaming rather than translating, it does the trick:
Obviously you can also return another translatable string by using
__( 'Edit My Userdata', 'your-text-domain' )
after the firstreturn
statement.