HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/chuair.org/wp-content/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();

			$message = __( 'Purged Everything!', 'nginx-helper' );
			WP_CLI::success( $message );

		}

	}

}