Merged in feature/165-dev-dev01 (pull request #12)

auto-patch  165-dev-dev01-2023-12-27T21_44_36

* auto-patch  165-dev-dev01-2023-12-27T21_44_36
This commit is contained in:
Jay Sharma
2023-12-27 21:46:01 +00:00
parent f710eda66e
commit 07f9307d0c
37 changed files with 21411 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?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();
$message = __( 'Purged Everything!', 'nginx-helper' );
WP_CLI::success( $message );
}
}
}