Site logo

Archived topic

add_filter for footer Elements Block

5 replies · Started by Manuel on April 18, 2022

Viewing posts 1–6 of 6

Hi,

i am using Email Address Encoder to protect email addresses from robots.
But actually it doesnt work for my Element footer block. It's possible to add a filter for scanning additional parts of the website:
add_filter( '%filter-name%', 'eae_encode_emails' ); (https://encoder.till.im/guide#filtering-content)

So my question is if there is a filter for the element block that I can use?

Hi there,

how is the email being added ? Can i see the site ?

Hi David,
I have just added the information.
Email is added via headline element

Thanks for that hint. It works like a charm. I ended up doing it like that:

add_filter( 'render_block', function( $block_content, $block ) {
	if ( 'generateblocks/headline' === $block['blockName'] ) {
		$block_content = eae_encode_emails( $block_content );
	}
	return $block_content;
}, 10, 2 );

Awesome - glad to hear that!

This archived topic is closed to new replies.