Created
February 5, 2015 15:59
-
-
Save mauriciogofas/72a42180f5ff539b831a to your computer and use it in GitHub Desktop.
Custom "howdy user" wp-admin Bar
This file contains hidden or 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
<?php | |
// Saudação customizada pt_BR | |
function replace_howdy( $wp_admin_bar ) { | |
$my_account=$wp_admin_bar->get_node('my-account'); | |
$newtitle = str_replace( 'Olá', 'Bem vindo', $my_account->title ); | |
$wp_admin_bar->add_node( array( | |
'id' => 'my-account', | |
'title' => $newtitle, | |
) ); | |
} | |
add_filter( 'admin_bar_menu', 'replace_howdy',25 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment