Skip to content

Instantly share code, notes, and snippets.

@Drabush
Created February 6, 2016 13:00
Show Gist options
  • Save Drabush/8845cd49762962de37f3 to your computer and use it in GitHub Desktop.
Save Drabush/8845cd49762962de37f3 to your computer and use it in GitHub Desktop.
HTML minifier plugin for MODX Revolution. Add to onWebPagePreRender event
<?php
//Минификация кода HTML. Включение плагина по событию onWebPagePreRender
$output = &$modx->resource->_output;
$output = preg_replace('|\s+|', ' ', $output);
$modx->resource->set('content', $output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment