Version Description
- June 2018
- Bug Fix: Prevent error for non-admins
Download this release
Release Info
Developer | Ipstenu |
Plugin | Varnish HTTP Purge |
Version | 4.5.2 |
Comparing to | |
See all releases |
Code changes from version 4.5.1 to 4.5.2
- readme.txt +6 -1
- varnish-http-purge.php +10 -5
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ipstenu, mikeschroder, techpriester
|
|
3 |
Tags: varnish, purge, cache
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 4.5.
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
@@ -166,6 +166,11 @@ This plugin is installed by default for _all_ DreamPress installs on DreamHost,
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
|
|
|
|
169 |
= 4.5.1 =
|
170 |
|
171 |
* June 2018
|
3 |
Tags: varnish, purge, cache
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 4.5.2
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 4.5.2 =
|
170 |
+
|
171 |
+
* June 2018
|
172 |
+
* Bug Fix: Prevent error for non-admins
|
173 |
+
|
174 |
= 4.5.1 =
|
175 |
|
176 |
* June 2018
|
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.5.
|
7 |
Author: Mika Epstein
|
8 |
Author URI: https://halfelf.org/
|
9 |
License: http://www.apache.org/licenses/LICENSE-2.0
|
@@ -172,7 +172,7 @@ class VarnishPurger {
|
|
172 |
* @since 4.5.0
|
173 |
*/
|
174 |
function custom_css() {
|
175 |
-
wp_register_style( 'varnish_http_purge', plugins_url( 'style.css', __FILE__ ), false, '
|
176 |
wp_enqueue_style( 'varnish_http_purge' );
|
177 |
}
|
178 |
|
@@ -184,6 +184,8 @@ class VarnishPurger {
|
|
184 |
function varnish_rightnow_adminbar( $admin_bar ) {
|
185 |
global $wp;
|
186 |
|
|
|
|
|
187 |
if ( ( !is_admin() && get_post() !== false && current_user_can( 'edit_published_posts' ) ) || current_user_can( 'activate_plugins' ) ) {
|
188 |
// Main Array
|
189 |
$args = array(
|
@@ -195,6 +197,7 @@ class VarnishPurger {
|
|
195 |
),
|
196 |
),
|
197 |
);
|
|
|
198 |
}
|
199 |
|
200 |
// Checking user permissions for who can and cannot use the all flush
|
@@ -244,8 +247,10 @@ class VarnishPurger {
|
|
244 |
);
|
245 |
}
|
246 |
|
247 |
-
|
248 |
-
|
|
|
|
|
249 |
}
|
250 |
}
|
251 |
|
@@ -667,4 +672,4 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
|
667 |
*
|
668 |
* @since 4.0
|
669 |
*/
|
670 |
-
include_once( 'status.php' );
|
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.5.2
|
7 |
Author: Mika Epstein
|
8 |
Author URI: https://halfelf.org/
|
9 |
License: http://www.apache.org/licenses/LICENSE-2.0
|
172 |
* @since 4.5.0
|
173 |
*/
|
174 |
function custom_css() {
|
175 |
+
wp_register_style( 'varnish_http_purge', plugins_url( 'style.css', __FILE__ ), false, '4.5.2' );
|
176 |
wp_enqueue_style( 'varnish_http_purge' );
|
177 |
}
|
178 |
|
184 |
function varnish_rightnow_adminbar( $admin_bar ) {
|
185 |
global $wp;
|
186 |
|
187 |
+
$can_purge = FALSE;
|
188 |
+
|
189 |
if ( ( !is_admin() && get_post() !== false && current_user_can( 'edit_published_posts' ) ) || current_user_can( 'activate_plugins' ) ) {
|
190 |
// Main Array
|
191 |
$args = array(
|
197 |
),
|
198 |
),
|
199 |
);
|
200 |
+
$can_purge = TRUE;
|
201 |
}
|
202 |
|
203 |
// Checking user permissions for who can and cannot use the all flush
|
247 |
);
|
248 |
}
|
249 |
|
250 |
+
if ( $can_purge ) {
|
251 |
+
foreach ( $args as $arg ) {
|
252 |
+
$admin_bar->add_node( $arg );
|
253 |
+
}
|
254 |
}
|
255 |
}
|
256 |
|
672 |
*
|
673 |
* @since 4.0
|
674 |
*/
|
675 |
+
include_once( 'status.php' );
|