With Bludit 3.x, the plugin only minifies a few last lines of HTML code.
To be able to minify all HTML code, we need to start the output buffering via the beforeAll hook.
The following code for the plugin.php works fine for me:
<?php
class pluginMinifyHTML extends Plugin {
public function init()
{
// Fields and default values for the database of this plugin
}
public function beforeAll()
{
ob_start();
}
public function afterAll()
{
require_once('class-minify-html.php');
$buffer = ob_get_clean();
echo Minify_HTML::minify($buffer);
}
}
With Bludit 3.x, the plugin only minifies a few last lines of HTML code.
To be able to minify all HTML code, we need to start the output buffering via the
beforeAll
hook.The following code for the
plugin.php
works fine for me: