WordPress render_block filter to remove all links from post-terms

I just needed to remove all links from all post terms blocks (for reasons). The filter render_block_{$this->name} is such a great resource for modifying core blocks and made it so simple to do.

add_filter('render_block_core/post-terms', function($block_content, $block) {
	return preg_replace('/\<a (.*?)\>/', '', $block_content);
}, 10, 2);

If you’re doing any kind of work with blocks in WP as a dev, it pays to have this filter always at the ready: https://developer.wordpress.org/reference/hooks/render_block_this-name/