HEX
Server: Apache
System: Linux web15f49.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: hzaluminio (728004)
PHP: 7.0.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/hzaluminio/www/sair/(FORA)wp-content (forA)/plugins/wp-fastest-cache/inc/cli.php
<?php
/**
 * WP-CLI commands for WP Fastest Cache.
 */

if(!defined('ABSPATH')){
    exit;
}

// This is a WP-CLI command, so bail if it's not available.
if(!defined('WP_CLI')){
    return;
}


class wpfcCLI extends \WP_CLI_Command
{
    /**
     * Clears the cache.
     *
     * ## EXAMPLES
     *      wp fastest-cache clear all
     *      wp fastest-cache clear all and minified
     *
     *
     * @subcommand clear
     *
     * @param array $args Args.
     * @param array $args_assoc Associative args.
     *
     * @return void
     */
    public function wrong_usage(){
        $message = array("*************************************************************************",
                         "* Wrong usage!                                                          *",
                         "* Please read: https://www.wpfastestcache.com/features/wp-cli-commands/ *",
                         "*************************************************************************");
        WP_CLI::error_multi_line($message);
    }

    public function clear($args, $args_assoc){
        if(isset($GLOBALS['wp_fastest_cache'])){
            if(method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')){
                if(isset($args[0])){
                    if($args[0] == "all"){
                        if(isset($args[1]) && isset($args[2])){
                            if($args[1] == "and" && $args[2] == "minified"){
                                WP_CLI::line("Clearing the ALL cache...");
                                $GLOBALS['wp_fastest_cache']->deleteCache(true);
                                WP_CLI::success("The cache has been cleared!");
                            }else{
                                self::wrong_usage();
                            }
                        }else{
                            WP_CLI::line("Clearing the ALL cache...");
                            $GLOBALS['wp_fastest_cache']->deleteCache();
                            WP_CLI::success("The cache has been cleared!");
                        }
                    }else{
                        self::wrong_usage();
                    }
                }else{
                    self::wrong_usage();
                }
            }else{
                WP_CLI::error("deleteCache() does not exist!");
            }
        }else{
            WP_CLI::error("GLOBALS['wp_fastest_cache'] has not been defined!");
        }
    }
}

WP_CLI::add_command( 'fastest-cache', 'wpfcCLI' );

?>