Current Path : /storage/v11800/ls-narendraram/public_html/wp-content/mu-plugins/nginx-helper/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/ls-narendraram/public_html/wp-content/mu-plugins/nginx-helper/class-nginx-helper-wp-cli-command.php |
<?php
/**
* Contains class for WP-CLI command.
*
* @since 2.0.0
* @package nginx-helper
*/
/**
* Don't load this file directly!
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Nginx_Helper_WP_CLI_Command' ) ) {
/**
* Purge site cache from Nginx.
*/
class Nginx_Helper_WP_CLI_Command extends WP_CLI_Command {
/**
* Subcommand to purge all cache from Nginx
*
* Examples:
* wp nginx-helper purge-all
*
* @subcommand purge-all
*
* @param array $args Arguments.
* @param array $assoc_args Arguments in associative array.
*/
public function purge_all( $args, $assoc_args ) {
global $nginx_purger;
$nginx_purger->purge_all();
do_action( 'rt_nginx_helper_after_purge_all' );
$message = __( 'Purged Everything!', 'nginx-helper' );
WP_CLI::success( $message );
}
}
}