Links
Comment on page

Changing Labels and Tooltips

Changing labels and tooltips programmatically
Example Core Code of Tooltips and Labels
There are several filters to programmatically change labels and tooltips.
Here's an example of changing a label and tooltip for Twitter:
<?php
// Modify the Twitter label.
add_filter(
'has_twitter_text',
function( $twitter_label ) {
return 'Tweet';
}
);
// Modify the Twitter Tooltip.
add_filter(
'has_twitter_tooltip',
function( $twitter_tooltip ) {
return 'Share on Twitter';
}
);
The following filters are enabled for labels and tooltips (they both return strings):
  • has_twitter_text | has_twitter_tooltip
  • has_facebook_text | has_facebook_tooltip
  • has_linkedin_text | has_linkedin_tooltip
  • has_xing_text | has_xing_tooltip
  • has_reddit_text | has_reddit_tooltip
  • has_telegram_text | has_telegram_tooltip
  • has_whatsapp_text | has_whatsapp_tooltip
  • has_copy_text | has_copy_tooltip
  • has_email_text | has_email_tooltip