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

Disable or Enable Text Selection

You can use the following filters for enabling or disabling Highlight and Share for certain posts or pages:

  • has_enable_content (returns a boolean)

  • has_enable_excerpt (returns a boolean)

You can use the above filters to show or hide Highlight and Share text selection on certain pages.

For example, to exclude Highlight and Share from an About page, you could do the following:

add_filter(
	'has_enable_content',
	function( $load_content ) {
		if ( is_page( 'highlight-and-share' ) ) {
			return false;
		}
		return $load_content;
	}
);
PreviousActions and FiltersNextChanging Labels and Tooltips

Last updated 2 years ago

Was this helpful?