Modify HTML output (Output Buffer)




Wordpress LScache Plugin: Modify HTML output (Output Buffer)

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hey! I have a user of one of our plugins (https://wordpress.org/plugins/real-cookie-banner/), and there happens something strange because our plugin modifies the content via ob_start, but the changes are only visible to logged-in users. I did some more research and found out that you offer custom filters to adjust the output buffer: https://docs.litespeedtech.com/lscache/lscwp/api/#modify-output-buffer-before Unfortunately, this does not help. I did a simple test with the following code in a custom plugin (no action, just plain in my-plugin.php): add_action(litespeed_buffer_after, function($content) return str_replace(



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference