Version Description
Download this release
Release Info
Developer | Ipstenu |
Plugin | Varnish HTTP Purge |
Version | 4.6.1 |
Comparing to | |
See all releases |
Code changes from version 4.6.0 to 4.6.1
- readme.txt +1 -1
- varnish-http-purge.php +5 -5
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.
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
3 |
Tags: varnish, purge, cache
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 4.6.1
|
7 |
Requires PHP: 5.6
|
8 |
|
9 |
Automatically empty Varnish Cache when content on your site is modified.
|
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.
|
7 |
* Author: Mika Epstein
|
8 |
* Author URI: https://halfelf.org/
|
9 |
* License: http://www.apache.org/licenses/LICENSE-2.0
|
@@ -269,7 +269,7 @@ class VarnishPurger {
|
|
269 |
*/
|
270 |
public function custom_css() {
|
271 |
if ( is_user_logged_in() ) {
|
272 |
-
wp_register_style( 'varnish_http_purge', plugins_url( 'style.css', __FILE__ ), false, '4.6.
|
273 |
wp_enqueue_style( 'varnish_http_purge' );
|
274 |
}
|
275 |
}
|
@@ -532,7 +532,7 @@ class VarnishPurger {
|
|
532 |
* @access protected
|
533 |
*/
|
534 |
public static function purge_url( $url ) {
|
535 |
-
$p = wp_parse_url(
|
536 |
|
537 |
// Bail early if there's no host since some plugins are weird.
|
538 |
if ( ! isset( $p['host'] ) ) {
|
@@ -573,7 +573,7 @@ class VarnishPurger {
|
|
573 |
$schema = apply_filters( 'varnish_http_purge_schema', 'http://' );
|
574 |
|
575 |
// If we made varniship, let it sail.
|
576 |
-
if ( isset( $varniship ) && !
|
577 |
$host = $varniship;
|
578 |
} else {
|
579 |
$host = $p['host'];
|
@@ -695,7 +695,7 @@ class VarnishPurger {
|
|
695 |
$listofurls = array();
|
696 |
|
697 |
// Verify we have a permalink and that we're a valid post status and a not an invalid post type.
|
698 |
-
if (
|
699 |
|
700 |
// Post URL.
|
701 |
array_push( $listofurls, get_permalink( $post_id ) );
|
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.1
|
7 |
* Author: Mika Epstein
|
8 |
* Author URI: https://halfelf.org/
|
9 |
* License: http://www.apache.org/licenses/LICENSE-2.0
|
269 |
*/
|
270 |
public function custom_css() {
|
271 |
if ( is_user_logged_in() ) {
|
272 |
+
wp_register_style( 'varnish_http_purge', plugins_url( 'style.css', __FILE__ ), false, '4.6.1' );
|
273 |
wp_enqueue_style( 'varnish_http_purge' );
|
274 |
}
|
275 |
}
|
532 |
* @access protected
|
533 |
*/
|
534 |
public static function purge_url( $url ) {
|
535 |
+
$p = wp_parse_url( $url );
|
536 |
|
537 |
// Bail early if there's no host since some plugins are weird.
|
538 |
if ( ! isset( $p['host'] ) ) {
|
573 |
$schema = apply_filters( 'varnish_http_purge_schema', 'http://' );
|
574 |
|
575 |
// If we made varniship, let it sail.
|
576 |
+
if ( isset( $varniship ) && ! empty( $varniship ) ) {
|
577 |
$host = $varniship;
|
578 |
} else {
|
579 |
$host = $p['host'];
|
695 |
$listofurls = array();
|
696 |
|
697 |
// Verify we have a permalink and that we're a valid post status and a not an invalid post type.
|
698 |
+
if ( false !== get_permalink( $post_id ) && in_array( $this_post_status, $valid_post_status, true ) && ! in_array( $this_post_type, $invalid_post_type, true ) ) {
|
699 |
|
700 |
// Post URL.
|
701 |
array_push( $listofurls, get_permalink( $post_id ) );
|