1. Home
  2. Knowledge Base
  3. Tasty Links
  4. Filter: Custom block compatibility

Filter: Custom block compatibility

Sometimes, custom blocks store their data in block attributes. By default, Tasty Links aren’t applied to block attributes. Starting with Tasty Links v1.0.1, we’ve included the option to use a filter to allow Tasty Links to be applied to a rendered block.

Here's an example of the code you can use to add compatibility with your own custom blocks:

add_filter(
	'tasty_links_enabled_rendered_blocks',
	function( $blocks ) {
		$blocks[] = 'your-plugin/your-block';
		return $blocks;
	}
);

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support