[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
wp-optimize
/
vendor
/
mrclay
/
minify
/
lib
/
Minify
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 CSS
SET
[ DEL ]
📁 Cache
SET
[ DEL ]
📁 Controller
SET
[ DEL ]
📁 HTML
SET
[ DEL ]
📁 JS
SET
[ DEL ]
📁 Logger
SET
[ DEL ]
📁 Source
SET
[ DEL ]
📄 App.php
9,765 B
SET
[ EDIT ]
|
[ DEL ]
📄 Build.php
2,670 B
SET
[ EDIT ]
|
[ DEL ]
📄 CSS.php
3,259 B
SET
[ EDIT ]
|
[ DEL ]
📄 CSSmin.php
2,733 B
SET
[ EDIT ]
|
[ DEL ]
📄 CacheInterface.php
1,153 B
SET
[ EDIT ]
|
[ DEL ]
📄 ClosureCompiler.php
6,170 B
SET
[ EDIT ]
|
[ DEL ]
📄 CommentPreserver.php
2,617 B
SET
[ EDIT ]
|
[ DEL ]
📄 Config.php
1,063 B
SET
[ EDIT ]
|
[ DEL ]
📄 ControllerInterface.php
411 B
SET
[ EDIT ]
|
[ DEL ]
📄 DebugDetector.php
784 B
SET
[ EDIT ]
|
[ DEL ]
📄 Env.php
3,211 B
SET
[ EDIT ]
|
[ DEL ]
📄 HTML.php
8,318 B
SET
[ EDIT ]
|
[ DEL ]
📄 ImportProcessor.php
7,468 B
SET
[ EDIT ]
|
[ DEL ]
📄 LessCssSource.php
2,890 B
SET
[ EDIT ]
|
[ DEL ]
📄 Lines.php
6,378 B
SET
[ EDIT ]
|
[ DEL ]
📄 NailgunClosureCompiler.php
2,801 B
SET
[ EDIT ]
|
[ DEL ]
📄 Packer.php
804 B
SET
[ EDIT ]
|
[ DEL ]
📄 ScssCssSource.php
4,142 B
SET
[ EDIT ]
|
[ DEL ]
📄 ServeConfiguration.php
1,451 B
SET
[ EDIT ]
|
[ DEL ]
📄 Source.php
5,451 B
SET
[ EDIT ]
|
[ DEL ]
📄 SourceInterface.php
1,428 B
SET
[ EDIT ]
|
[ DEL ]
📄 SourceSet.php
590 B
SET
[ EDIT ]
|
[ DEL ]
📄 YUICompressor.php
4,633 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: Source.php
<?php /** * Class Minify_Source * @package Minify */ /** * A content source to be minified by Minify. * * This allows per-source minification options and the mixing of files with * content from other sources. * * @package Minify * @author Stephen Clay <steve@mrclay.org> */ class Minify_Source implements Minify_SourceInterface { /** * @var int time of last modification */ protected $lastModified; /** * @var callback minifier function specifically for this source. */ protected $minifier; /** * @var array minification options specific to this source. */ protected $minifyOptions = array(); /** * @var string full path of file */ protected $filepath; /** * @var string HTTP Content Type (Minify requires one of the constants Minify::TYPE_*) */ protected $contentType; /** * @var string */ protected $content; /** * @var callable */ protected $getContentFunc; /** * @var string */ protected $id; /** * Create a Minify_Source * * In the $spec array(), you can either provide a 'filepath' to an existing * file (existence will not be checked!) or give 'id' (unique string for * the content), 'content' (the string content) and 'lastModified' * (unixtime of last update). * * @param array $spec options */ public function __construct($spec) { if (isset($spec['filepath'])) { $ext = pathinfo($spec['filepath'], PATHINFO_EXTENSION); switch ($ext) { case 'js': $this->contentType = Minify::TYPE_JS; break; case 'less': // fallthrough case 'scss': // fallthrough case 'css': $this->contentType = Minify::TYPE_CSS; break; case 'htm': // fallthrough case 'html': $this->contentType = Minify::TYPE_HTML; break; } $this->filepath = $spec['filepath']; $this->id = $spec['filepath']; // TODO ideally not touch disk in constructor $this->lastModified = filemtime($spec['filepath']); if (!empty($spec['uploaderHoursBehind'])) { // offset for Windows uploaders with out of sync clocks $this->lastModified += round($spec['uploaderHoursBehind'] * 3600); } } elseif (isset($spec['id'])) { $this->id = 'id::' . $spec['id']; if (isset($spec['content'])) { $this->content = $spec['content']; } else { $this->getContentFunc = $spec['getContentFunc']; } $this->lastModified = isset($spec['lastModified']) ? $spec['lastModified'] : time(); } if (isset($spec['contentType'])) { $this->contentType = $spec['contentType']; } if (isset($spec['minifier'])) { $this->setMinifier($spec['minifier']); } if (isset($spec['minifyOptions'])) { $this->minifyOptions = $spec['minifyOptions']; } } /** * {@inheritdoc} */ public function getLastModified() { return $this->lastModified; } /** * {@inheritdoc} */ public function getMinifier() { return $this->minifier; } /** * {@inheritdoc} */ public function setMinifier($minifier = null) { if ($minifier === '') { error_log(__METHOD__ . " cannot accept empty string. Use 'Minify::nullMinifier' or 'trim'."); $minifier = 'Minify::nullMinifier'; } if ($minifier !== null && !is_callable($minifier, true)) { throw new InvalidArgumentException('minifier must be null or a valid callable'); } $this->minifier = $minifier; } /** * {@inheritdoc} */ public function getMinifierOptions() { return $this->minifyOptions; } /** * {@inheritdoc} */ public function setMinifierOptions(array $options) { $this->minifyOptions = $options; } /** * {@inheritdoc} */ public function getContentType() { return $this->contentType; } /** * {@inheritdoc} */ public function getContent() { if (null === $this->filepath) { if (null === $this->content) { $content = call_user_func($this->getContentFunc, $this->id); } else { $content = $this->content; } } else { $content = file_get_contents($this->filepath); } // remove UTF-8 BOM if present if (strpos($content, "\xEF\xBB\xBF") === 0) { return substr($content, 3); } return $content; } /** * {@inheritdoc} */ public function getId() { return $this->id; } /** * {@inheritdoc} */ public function getFilePath() { return $this->filepath; } /** * {@inheritdoc} */ public function setupUriRewrites() { if ($this->filepath && !isset($this->minifyOptions['currentDir']) && !isset($this->minifyOptions['prependRelativePath'])) { $this->minifyOptions['currentDir'] = dirname($this->filepath); } } }