Skip to content

Commit

Permalink
Edited wiki page through web user interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve@mrclay.org committed Mar 25, 2010
1 parent ab6087b commit 658b314
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion CookBook.wiki
Expand Up @@ -109,4 +109,19 @@ if (isset($_GET['g'])) {

== File/Source-specific Options ==

See CustomSource.
See CustomSource.

== Processing Output After Minification ==

If `$min_serveOptions['postprocessor']` is set to a callback, Minify will pass the minified content to this function with type as the second argument. This allows you to apply changes to your minified content without making your own custom minifier. E.g.:
{{{
function postProcess($content, $type) {
if ($type === Minify::TYPE_CSS) {
require_once 'CssColorReplacer.php';
return CssColorReplacer::process($content);
}
return $content;
}
$min_serveOptions['postprocessor'] = 'postProcess';
}}}
This function is only called once immediately after minification and its output is stored in the cache.

0 comments on commit 658b314

Please sign in to comment.