Ad
Wordpress: Rename Toolbar Link
I need to rename a Toolbar link, take a look at the capture to see what I mean.
I found this line of code to remove a link $wp_adminbar->remove_node('wp-logo');
But nothing to 'rename'.
Ad
Answer
From this question How rename a plugin title > Wordpress > Dashboard
You may use the gettext
WordPress filter to achieve rename your menu in your plugin or theme functions.php
file:
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Copy to a new draft' :
$translated_text = 'CLONE';
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );
Ad
source: stackoverflow.com
Related Questions
- → CORS missmatch because of http
- → Building sitemap for 2 wordpress install under 1 domain
- → How to remove empty elements after class?(jQuery)
- → Get width of an element and apply to another relative to the first one?
- → How to remove caption p class from wordpress?
- → 301 Redirection from no-www to www in wordpress
- → Laravel 5 routing using prefix
- → WordPress - Header position Top, Left &Right
- → how to add rel=nofollow to some specific external links in wordpress
- → octobercms install error: database is not empty?
- → How to edit the index page of wordpress theme?
- → How to select a Post Type (Wordpress) to pass a filter in head?
- → What sort of URL structure should be used to display AMP HTML vs vanilla HTML
Ad