Nginx Helper - Version 1.8.5

Version Description

  • Added WP_CLI support - by Udit Desai
Download this release

Release Info

Developer rtcamp
Plugin Icon 128x128 Nginx Helper
Version 1.8.5
Comparing to
See all releases

Code changes from version 1.8.4 to 1.8.5

Files changed (4) hide show
  1. nginx-helper.php +8 -1
  2. readme.txt +5 -2
  3. wercker.yml +22 -0
  4. wp-cli.php +37 -0
nginx-helper.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Nginx Helper
4
  Plugin URI: http://rtcamp.com/nginx-helper/
5
  Description: An nginx helper that serves various functions.
6
- Version: 1.8.4
7
  Author: rtCamp
8
  Author URI: http://rtcamp.com
9
  Text Domain: nginx-helper
@@ -20,6 +20,7 @@ namespace rtCamp\WP\Nginx {
20
  var $minium_WP = '3.0';
21
  var $options = null;
22
  var $plugin_name = 'nginx-helper';
 
23
 
24
  function __construct() {
25
 
@@ -70,6 +71,12 @@ namespace rtCamp\WP\Nginx {
70
  add_action('delete_term', array(&$rt_wp_nginx_purger, 'purge_on_term_taxonomy_edited'), 20, 3);
71
  add_action('check_ajax_referer', array(&$rt_wp_nginx_purger, 'purge_on_check_ajax_referer'), 20, 2);
72
  add_action('admin_init', array(&$this, 'purge_all'));
 
 
 
 
 
 
73
  }
74
 
75
  function activate() {
3
  Plugin Name: Nginx Helper
4
  Plugin URI: http://rtcamp.com/nginx-helper/
5
  Description: An nginx helper that serves various functions.
6
+ Version: 1.8.5
7
  Author: rtCamp
8
  Author URI: http://rtcamp.com
9
  Text Domain: nginx-helper
20
  var $minium_WP = '3.0';
21
  var $options = null;
22
  var $plugin_name = 'nginx-helper';
23
+ const WP_CLI_COMMAND = 'nginx-helper';
24
 
25
  function __construct() {
26
 
71
  add_action('delete_term', array(&$rt_wp_nginx_purger, 'purge_on_term_taxonomy_edited'), 20, 3);
72
  add_action('check_ajax_referer', array(&$rt_wp_nginx_purger, 'purge_on_check_ajax_referer'), 20, 2);
73
  add_action('admin_init', array(&$this, 'purge_all'));
74
+
75
+ // Load WP-CLI command
76
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
77
+ require_once RT_WP_NGINX_HELPER_PATH . 'wp-cli.php';
78
+ \WP_CLI::add_command( self::WP_CLI_COMMAND, 'Nginx_Helper_WP_CLI_Command' );
79
+ }
80
  }
81
 
82
  function activate() {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: rtcamp, rahul286, saurabhshukla, faishal, desaiuditd, rittesh.pate
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 1.8.4
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
@@ -116,6 +116,9 @@ Its just that we are hyperactive on our own forum!
116
 
117
  == Changelog ==
118
 
 
 
 
119
  = 1.8.4 =
120
  * Fix undefined index issue and correct "purge_archive_on_del" key
121
 
@@ -139,7 +142,7 @@ Its just that we are hyperactive on our own forum!
139
  * Fixed option name mismatch issue to purge homepage on delete.
140
 
141
  = 1.7.4 =
142
- * Disable purge and stamp by defualt.
143
 
144
  = 1.7.3 =
145
  * Suppressed `unlink` related error-messages which can be safely ignored.
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 1.8.5
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
116
 
117
  == Changelog ==
118
 
119
+ = 1.8.5 =
120
+ * Added WP_CLI support - by [Udit Desai](https://profiles.wordpress.org/desaiuditd/)
121
+
122
  = 1.8.4 =
123
  * Fix undefined index issue and correct "purge_archive_on_del" key
124
 
142
  * Fixed option name mismatch issue to purge homepage on delete.
143
 
144
  = 1.7.4 =
145
+ * Disable purge and stamp by default.
146
 
147
  = 1.7.3 =
148
  * Suppressed `unlink` related error-messages which can be safely ignored.
wercker.yml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ box: ubuntu
2
+
3
+ build:
4
+ steps:
5
+
6
+ - script:
7
+ name: placehoder
8
+ code: echo "nothing to build"
9
+
10
+ deploy:
11
+ steps:
12
+ # - install-packages:
13
+ # packages: subversion git wget
14
+
15
+ - rtcamp/wordpress-svn:
16
+ pluginslug: nginx-helper
17
+ mainfile: nginx-helper.php
18
+ svnuser: $SVNUSER
19
+ svnpass: $SVNPASS #wordpress.org password
20
+ gituser: $GITUSER
21
+ gitpass: $GITPASS #github.com password
22
+ gitemail: git@example.com #github.com password
wp-cli.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: udit
5
+ * Date: 19/3/15
6
+ * Time: 2:06 PM
7
+ */
8
+
9
+ /**
10
+ * Don't load this file directly!
11
+ */
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ if ( ! class_exists( 'Nginx_Helper_WP_CLI_Command' ) ) {
17
+
18
+ class Nginx_Helper_WP_CLI_Command extends WP_CLI_Command {
19
+
20
+ /**
21
+ * Subcommand to purge all cache from Nginx
22
+ *
23
+ * Examples:
24
+ * wp nginx-helper purge_all
25
+ *
26
+ * @subcommand purge-all
27
+ */
28
+ public function purge_all( $args, $assoc_args ) {
29
+ global $rt_wp_nginx_purger;
30
+ $rt_wp_nginx_purger->true_purge_all();
31
+ $message = __( 'Purged Everything!' );
32
+ WP_CLI::success( $message );
33
+ }
34
+
35
+ }
36
+
37
+ }