PluginProbe
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript / trunk
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript vtrunk
trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.4 1.5 1.5.1 1.6 2.0 2.0.1
wp-super-minify / includes / min / builder / test.php

test.php in WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript trunk, at includes/min/builder/test.php

44 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 exit;
3 /* currently unused.
4
5 // capture PHP's default setting (may get overridden in config
6 $_oc = ini_get('zlib.output_compression');
7
8 // allow access only if builder is enabled
9 require __DIR__ . '/../config.php';
10 if (! $min_enableBuilder) {
11 exit;
12 }
13
14 if (isset($_GET['oc'])) {
15 header('Content-Type: text/plain');
16 echo (int)$_oc;
17
18 } elseif (isset($_GET['text']) && in_array($_GET['text'], array('js', 'css', 'fake'))) {
19 ini_set('zlib.output_compression', '0');
20 $type = ($_GET['text'] == 'js')
21 ? 'application/x-javascript'
22 : "text/{$_GET['text']}";
23 header("Content-Type: {$type}");
24 echo 'Hello';
25
26 } elseif (isset($_GET['docroot'])) {
27 if (false === realpath($_SERVER['DOCUMENT_ROOT'])) {
28 echo "<p class=topWarning><strong>realpath(DOCUMENT_ROOT) failed.</strong> You may need "
29 . "to set \$min_documentRoot manually (hopefully realpath() is not "
30 . "broken in your environment).</p>";
31 }
32 if (0 !== strpos(realpath(__FILE__), realpath($_SERVER['DOCUMENT_ROOT']))) {
33 echo "<p class=topWarning><strong>DOCUMENT_ROOT doesn't contain this file.</strong> You may "
34 . " need to set \$min_documentRoot manually</p>";
35 }
36 if (isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
37 echo "<p class=topNote><strong>\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set.</strong> "
38 . "You may need to set \$min_documentRoot to this in config.php</p>";
39 }
40
41 }
42
43 //*/
44