X7ROOT File Manager
Current Path:
/home/greejped/haldiawater.com/wp-content/plugins/wp-smushit/core
home
/
greejped
/
haldiawater.com
/
wp-content
/
plugins
/
wp-smushit
/
core
/
ðŸ“
..
ðŸ“
api
ðŸ“
backups
📄
class-animated-status-controller.php
(2.75 KB)
📄
class-array-utils.php
(1.06 KB)
📄
class-attachment-id-list.php
(2.38 KB)
📄
class-backup-size.php
(1.5 KB)
📄
class-cli.php
(7.36 KB)
📄
class-configs.php
(22.06 KB)
📄
class-controller.php
(1.49 KB)
📄
class-core.php
(17.41 KB)
📄
class-deprecated-hooks.php
(3.8 KB)
📄
class-error-handler.php
(7.96 KB)
📄
class-file-system.php
(1.58 KB)
📄
class-helper.php
(27.86 KB)
📄
class-installer.php
(9.35 KB)
📄
class-modules.php
(4.05 KB)
📄
class-optimization-controller.php
(1.03 KB)
📄
class-plugin-settings-watcher.php
(2.33 KB)
📄
class-rest.php
(2.98 KB)
📄
class-server-utils.php
(1.86 KB)
📄
class-settings.php
(34.98 KB)
📄
class-smush-file.php
(311 B)
📄
class-stats.php
(37.54 KB)
📄
class-upload-dir.php
(3.63 KB)
ðŸ“
external
ðŸ“
integrations
ðŸ“
media
ðŸ“
media-library
ðŸ“
modules
ðŸ“
photon
ðŸ“
png2jpg
ðŸ“
resize
ðŸ“
s3
ðŸ“
smush
ðŸ“
stats
ðŸ“
webp
Editing: class-file-system.php
<?php namespace Smush\Core; class File_System { public function file_get_contents( $path, $use_include_path = false, $context = null, $offset = 0, $length = null ) { if ( ! $this->is_valid_path( $path ) ) { return false; } $args = array( $path, $use_include_path, $context, $offset ); if ( ! is_null( $length ) ) { // Even though the default value of $length is 'null', an empty string is returned when 'null' is passed as $length. So, we only include it when a non-null value is provided. $args[] = $length; } return call_user_func_array( 'file_get_contents', $args ); } public function file_exists( $path ) { return $this->validate_and_call( 'file_exists', $path ); } public function unlink( $path ) { return $this->validate_and_call( 'unlink', $path ); } public function copy( $source, $destination ) { return $this->validate_and_call( 'copy', $source, $destination ); } public function is_file( $file ) { return $this->validate_and_call( 'is_file', $file ); } public function is_dir( $path ) { return $this->validate_and_call( 'is_dir', $path ); } public function filesize( $file ) { return $this->validate_and_call( 'filesize', $file ); } public function getimagesize( $path ) { return $this->validate_and_call( 'getimagesize', $path ); } private function validate_and_call( $callback, ...$args ) { foreach ( $args as $arg ) { if ( ! $this->is_valid_path( $arg ) ) { return false; } } return call_user_func_array( $callback, $args ); } private function is_valid_path( $path ) { return false === stripos( $path, 'phar://' ); } }
Upload File
Create Folder