Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (37 sloc) 812 Bytes
<?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' ) ) {
/**
* Class Nginx_Helper_WP_CLI_Command
*/
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();
$message = __( 'Purged Everything!', 'nginx-helper' );
WP_CLI::success( $message );
}
}
}
You can’t perform that action at this time.