Skip to content

Instantly share code, notes, and snippets.


Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b [a new branch name]
davidmroth / functions.php
Created Feb 16, 2019 — forked from unfulvio/functions.php
WordPress HTML Minification Class to compress HTML (removal of whitespaces, line breaks, new lines, comments). Preserves script comments (if removed might break some javascripts like Google Analytics or Adsense) and IE specific tags.
View functions.php
/* Minifies HTML and removes comments (except IE tags and comments within script tags)
* To disable compression of code portions, use '<!--wp-html-compression no compression-->' tag
* @see
* @see
class WP_HTML_Compression
// Settings