forked from rtCamp/nginx-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp-cli.php
More file actions
37 lines (31 loc) · 640 Bytes
/
wp-cli.php
File metadata and controls
37 lines (31 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Created by PhpStorm.
* User: udit
* Date: 19/3/15
* Time: 2:06 PM
*/
/**
* Don't load this file directly!
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( '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
*/
public function purge_all( $args, $assoc_args ) {
global $rt_wp_nginx_purger;
$rt_wp_nginx_purger->true_purge_all();
$message = __( 'Purged Everything!' );
WP_CLI::success( $message );
}
}
}