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-server-utils.php
<?php namespace Smush\Core; class Server_Utils { /** * @var string */ private $mysql_version; public function get_server_type() { if ( empty( $_SERVER['SERVER_SOFTWARE'] ) ) { return ''; } $server_software = wp_unslash( $_SERVER['SERVER_SOFTWARE'] ); if ( ! is_array( $server_software ) ) { $server_software = array( $server_software ); } $server_software = array_map( 'strtolower', $server_software ); $is_nginx = $this->array_has_needle( $server_software, 'nginx' ); if ( $is_nginx ) { return 'nginx'; } $is_apache = $this->array_has_needle( $server_software, 'apache' ); if ( $is_apache ) { return 'apache'; } return ''; } public function get_memory_limit() { if ( function_exists( 'ini_get' ) ) { $memory_limit = ini_get( 'memory_limit' ); } else { // Sensible default. $memory_limit = '128M'; } if ( ! $memory_limit || - 1 === $memory_limit ) { // Unlimited, set to 32GB. $memory_limit = '32000M'; } return intval( $memory_limit ) * 1024 * 1024; } public function get_memory_usage() { return memory_get_usage( true ); } private function array_has_needle( $array, $needle ) { foreach ( $array as $item ) { if ( strpos( $item, $needle ) !== false ) { return true; } } return false; } public function get_mysql_version() { if ( ! $this->mysql_version ) { global $wpdb; /** * MariaDB version prefix 5.5.5- is not stripped when using $wpdb->db_version() to get the DB version: * https://github.com/php/php-src/issues/7972 */ $this->mysql_version = $wpdb->get_var( 'SELECT VERSION()' ); } return $this->mysql_version; } public function get_max_execution_time() { return (int) ini_get( 'max_execution_time' ); } public function get_user_agent() { return ! empty( $_SERVER['HTTP_USER_AGENT'] ) ? wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) : ''; } }
Upload File
Create Folder