| Server IP : 207.135.97.11 / Your IP : 172.19.0.1 Web Server : LiteSpeed System : Linux 6d372a2d2e33 5.14.0-611.24.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jan 23 11:42:43 UTC 2026 x86_64 User : nobody ( 65534) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/ed.net.au/wp-content/plugins/fast-velocity-minify/inc/ |
Upload File : |
<?php
# Exit if accessed directly
if (!defined('ABSPATH')){ exit(); }
###################################################
# extend wp-cli to purge cache, usage: wp fvm purge
###################################################
# only for wp-cli
if ( defined( 'WP_CLI' ) && WP_CLI ) {
class fastvelocity_WPCLI {
# purge files + cache
public function purge() {
WP_CLI::success( __( 'FVM and other caches were purged.', 'fast-velocity-minify' ) );
fvm_purge_static_files();
fvm_purge_others();
# purge everything
$cache = fvm_purge_static_files();
$others = fvm_purge_others();
# notices
WP_CLI::success( __( 'FVM: All Caches are now cleared.', 'fast-velocity-minify' ) .' ('.date("D, d M Y @ H:i:s e").')');
if(is_string($cache)) { WP_CLI::warning($cache); }
if(is_string($others)) { WP_CLI::success($others); }
}
# get cache size
public function stats() {
WP_CLI::error( __( 'This feature is currently under development.', 'fast-velocity-minify' ) );
}
}
# add commands
WP_CLI::add_command( 'fvm', 'fastvelocity_WPCLI' );
}