Varnish HTTP Purge - Version 4.6.3

Version Description

  • August 2018
  • Deprecated function support
Download this release

Release Info

Developer Ipstenu
Plugin Icon 128x128 Varnish HTTP Purge
Version 4.6.3
Comparing to
See all releases

Code changes from version 4.6.2 to 4.6.3

Files changed (3) hide show
  1. readme.txt +6 -23
  2. varnish-http-purge.php +7 -7
  3. wp-cli.php +5 -3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Ipstenu, mikeschroder, techpriester, danielbachhuber
3
  Tags: varnish, purge, cache
4
  Requires at least: 4.7
5
  Tested up to: 4.9
6
- Stable tag: 4.6.2
7
  Requires PHP: 5.6
8
 
9
  Automatically empty Varnish Cache when content on your site is modified.
@@ -188,6 +188,11 @@ This plugin is installed by default for _all_ DreamPress installs on DreamHost,
188
 
189
  == Changelog ==
190
 
 
 
 
 
 
191
  = 4.6.2 =
192
 
193
  * July 2018
@@ -213,28 +218,6 @@ This plugin is installed by default for _all_ DreamPress installs on DreamHost,
213
  * WP-CLI: add debug option to grep content for known issues (props @danielbachhuber)
214
  * WP-CLI: add new command to change devmode state
215
 
216
- = 4.5.2 =
217
-
218
- * June 2018
219
- * Bug Fix: Prevent error for non-admins
220
-
221
- = 4.5.1 =
222
-
223
- * June 2018
224
- * Due to contention (devs hate it, users like it) the empty cache button colour on the toolbar is removed, and replaced with a carrot icon (I did not make it orange, but I wanted to)
225
- * Add carrot icon to collapsed (mobile) toolbar
226
- * Better button hiding
227
- * Fixed a stupid argument issue with flushing memcached and I should have known better but oh well
228
- * FAQ update re nginx
229
-
230
- = 4.5.0 =
231
-
232
- * May 2018
233
- * Remote storage of problem plugins/themes
234
- * Prevent auto-loading of scan for improved disclosure and compliance
235
- * Changed colour of the purge button for improved visibility
236
- * Support for nginx proxy headers
237
-
238
  == Screenshots ==
239
 
240
  1. Purge button on Right Now (Dashboard Admin)
3
  Tags: varnish, purge, cache
4
  Requires at least: 4.7
5
  Tested up to: 4.9
6
+ Stable tag: 4.6.3
7
  Requires PHP: 5.6
8
 
9
  Automatically empty Varnish Cache when content on your site is modified.
188
 
189
  == Changelog ==
190
 
191
+ = 4.6.3 =
192
+
193
+ * August 2018
194
+ * Deprecated function support
195
+
196
  = 4.6.2 =
197
 
198
  * July 2018
218
  * WP-CLI: add debug option to grep content for known issues (props @danielbachhuber)
219
  * WP-CLI: add new command to change devmode state
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  == Screenshots ==
222
 
223
  1. Purge button on Right Now (Dashboard Admin)
varnish-http-purge.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Varnish HTTP Purge
4
  * Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
5
  * Description: Automatically empty cached pages when content on your site is modified.
6
- * Version: 4.6.2
7
  * Author: Mika Epstein
8
  * Author URI: https://halfelf.org/
9
  * License: http://www.apache.org/licenses/LICENSE-2.0
@@ -849,22 +849,22 @@ class VarnishPurger {
849
  * These have all been name changed to proper names, but just in case...
850
  */
851
  public function getRegisterEvents() {
852
- get_register_events();
853
  }
854
  public function getNoIDEvents() {
855
- get_no_id_events();
856
  }
857
  public function executePurge() {
858
- execute_purge();
859
  }
860
  public function purgeNoID( $post_id ) {
861
- execute_purge_no_id( $post_id );
862
  }
863
  public function purgeURL( $url ) {
864
- purge_url( $url );
865
  }
866
  public function purgePost( $post_id ) {
867
- purge_post( $post_id );
868
  }
869
  // @codingStandardsIgnoreEnd
870
 
3
  * Plugin Name: Varnish HTTP Purge
4
  * Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
5
  * Description: Automatically empty cached pages when content on your site is modified.
6
+ * Version: 4.6.3
7
  * Author: Mika Epstein
8
  * Author URI: https://halfelf.org/
9
  * License: http://www.apache.org/licenses/LICENSE-2.0
849
  * These have all been name changed to proper names, but just in case...
850
  */
851
  public function getRegisterEvents() {
852
+ self::get_register_events();
853
  }
854
  public function getNoIDEvents() {
855
+ self::get_no_id_events();
856
  }
857
  public function executePurge() {
858
+ self::execute_purge();
859
  }
860
  public function purgeNoID( $post_id ) {
861
+ self::execute_purge_no_id( $post_id );
862
  }
863
  public function purgeURL( $url ) {
864
+ self::purge_url( $url );
865
  }
866
  public function purgePost( $post_id ) {
867
+ self::purge_post( $post_id );
868
  }
869
  // @codingStandardsIgnoreEnd
870
 
wp-cli.php CHANGED
@@ -229,11 +229,13 @@ if ( ! class_exists( 'WP_CLI_Varnish_Command' ) ) {
229
  $paths = array_unique( $paths );
230
  foreach ( $paths as $path ) {
231
  $cmd = sprintf(
232
- "grep -RE '%s' %s",
 
233
  $pattern,
234
- escapeshellarg( $path )
 
235
  );
236
- passthru( $cmd );
237
  }
238
  WP_CLI::log( '' );
239
  WP_CLI::log( __( 'Grep complete. If no data was output, you\'re good!', 'varnish-http-purge' ) );
229
  $paths = array_unique( $paths );
230
  foreach ( $paths as $path ) {
231
  $cmd = sprintf(
232
+ // Greps for matches and removes ABSPATH from filepath.
233
+ "grep --include=*.php -RE '%s' %s | cut -d '/' -f %d-",
234
  $pattern,
235
+ escapeshellarg( $path ),
236
+ substr_count( ABSPATH, '/' ) + 1
237
  );
238
+ system( $cmd );
239
  }
240
  WP_CLI::log( '' );
241
  WP_CLI::log( __( 'Grep complete. If no data was output, you\'re good!', 'varnish-http-purge' ) );