Skip to content

Instantly share code, notes, and snippets.

@ezersky
Forked from Drabush/minifyHTML.php
Created September 10, 2017 12:16
Show Gist options
  • Save ezersky/32bf01a6a0f44c606f5d0b970d041d20 to your computer and use it in GitHub Desktop.
Save ezersky/32bf01a6a0f44c606f5d0b970d041d20 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