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-optimization-controller.php
<?php namespace Smush\Core; use Smush\Core\Stats\Global_Stats; class Optimization_Controller extends Controller { /** * @var Global_Stats */ private $global_stats; public function __construct() { $this->global_stats = Global_Stats::get(); $this->register_action( 'wp_smush_image_sizes_changed', array( $this, 'mark_global_stats_as_outdated' ) ); $this->register_action( 'wp_smush_settings_updated', array( $this, 'maybe_mark_global_stats_as_outdated', ), 10, 2 ); // TODO: handle auto optimization when media item is uploaded // TODO: handle bulk smush ajax } public function mark_global_stats_as_outdated() { $this->global_stats->mark_as_outdated(); } public function maybe_mark_global_stats_as_outdated( $old_settings, $settings ) { $old_original = ! empty( $old_settings['original'] ); $new_original = ! empty( $settings['original'] ); $original_status_changed = $old_original !== $new_original; if ( $original_status_changed ) { $this->mark_global_stats_as_outdated(); } } }
Upload File
Create Folder