LogoLogo
Highlight and ShareGet QuotesDLXDLX PluginsMediaRon
Highlight and Share
Highlight and Share
  • Welcome to Highlight and Share
  • Getting Started
    • Installing the Plugin
    • Finding the Plugin's Settings
    • How Highlight and Share Works
    • Configuring the Display Settings
    • Enabling the Social Networks
    • Enabling Shortlinks
    • Advanced Selectors
    • Changing Themes and Appearance
      • The Theme Preview
      • Reordering the Social Networks
      • Choosing a Theme
      • Configuring a Custom Theme
  • Inline Highlighting
    • What is Inline Highlighting
    • How to Add Inline Highlighting to Text
    • Configure Inline Highlighting
  • Image Sharing
    • What is Image Sharing?
    • Configuring Image Sharing
  • Click to Share Shortcode
    • Shortcode Parameters
    • Custom Shortcode Themes
  • Click to Share Block
    • The Click to Share Block
    • Configuring the Block Editor Settings
  • Emails
    • Email Sharing
    • Email Admin Settings
  • Developers
    • Available Social Networks
    • Actions and Filters
      • Disable or Enable Text Selection
      • Changing Labels and Tooltips
      • Disabling CSS
      • Enabling or Disabling Social Networks
    • GitHub Repo
  • Quick Links
    • Highlight and Share Home
    • Highlight and Share Download
    • Support
    • MediaRon Home
    • DLX Plugins Home
    • Brand Assets
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Developers
  2. Actions and Filters

Changing Labels and Tooltips

Changing labels and tooltips programmatically

PreviousDisable or Enable Text SelectionNextDisabling CSS

Last updated 2 years ago

Was this helpful?

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

Example Core Code of Tooltips and Labels