PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / mrclay / minify / lib / Minify / Packer.php

Packer.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/mrclay/minify/lib/Minify/Packer.php

32 lines 804 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class Minify_Packer
4 *
5 * To use this class you must first download the PHP port of Packer
6 * and place the file "class.JavaScriptPacker.php" in /lib (or your
7 * include_path).
8 * @link http://joliclic.free.fr/php/javascript-packer/en/
9 *
10 * Be aware that, as long as HTTP encoding is used, scripts minified with JSMin
11 * will provide better client-side performance, as they need not be unpacked in
12 * client-side code.
13 *
14 * @package Minify
15 */
16
17 /**
18 * Minify Javascript using Dean Edward's Packer
19 *
20 * @package Minify
21 */
22 class Minify_Packer
23 {
24 public static function minify($code, $options = array())
25 {
26 // @todo: set encoding options based on $options :)
27 $packer = new JavascriptPacker($code, 'Normal', true, false);
28
29 return trim($packer->pack());
30 }
31 }
32