Filtering before rendering blocks in edit screeen
-
I’m using this plugin but I have a filter on my content and I want that filter applied when the block renders in the edit screen. Right now I do it by, at the the bottom of the render_block_template function in php/Blocks/Loader.php where it says:
return ob_get_clean();
I replaced it with:
$output = ob_get_clean(); $output = str_replace("apple","banana",$output); return $output;
This works fine except that when the plugin gets updated, I have to add it again. Is there a better way to do it?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Filtering before rendering blocks in edit screeen’ is closed to new replies.