Version Description
Fix purging for custom post types
Download this release
Release Info
Developer | rahul286 |
Plugin | Nginx Helper |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.9.1
- nginx-helper.php +13 -13
- readme.txt +7 -1
nginx-helper.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nginx Helper
|
4 |
Plugin URI: https://rtcamp.com/nginx-helper/
|
5 |
Description: Cleans nginx's fastcgi/proxy cache whenever a post is edited/published. Also does few more things.
|
6 |
-
Version: 1.9
|
7 |
Author: rtCamp
|
8 |
Author URI: https://rtcamp.com
|
9 |
Text Domain: nginx-helper
|
@@ -49,20 +49,21 @@ namespace rtCamp\WP\Nginx {
|
|
49 |
add_action( 'shutdown', array( &$this, 'add_timestamps' ), 99999 );
|
50 |
add_action( 'add_init', array( &$this, 'update_map' ) );
|
51 |
|
52 |
-
add_action( '
|
53 |
-
add_action( '
|
|
|
54 |
add_action( 'wp_insert_comment', array( &$rt_wp_nginx_purger, 'purgePostOnComment' ), 200, 2 );
|
55 |
add_action( 'transition_comment_status', array( &$rt_wp_nginx_purger, 'purgePostOnCommentChange' ), 200, 3 );
|
56 |
|
57 |
-
$args = array( '_builtin' => false );
|
58 |
-
$_rt_custom_post_types = get_post_types( $args );
|
59 |
-
if ( isset( $post_types ) && !empty( $post_types ) ) {
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
}
|
66 |
|
67 |
add_action( 'transition_post_status', array( &$this, 'set_future_post_option_on_future_status' ), 20, 3 );
|
68 |
add_action( 'delete_post', array( &$this, 'unset_future_post_option_on_delete' ), 20, 1 );
|
@@ -432,4 +433,3 @@ namespace {
|
|
432 |
|
433 |
add_action( 'init', 'fetch_feeds' );
|
434 |
}
|
435 |
-
|
3 |
Plugin Name: Nginx Helper
|
4 |
Plugin URI: https://rtcamp.com/nginx-helper/
|
5 |
Description: Cleans nginx's fastcgi/proxy cache whenever a post is edited/published. Also does few more things.
|
6 |
+
Version: 1.9.1
|
7 |
Author: rtCamp
|
8 |
Author URI: https://rtcamp.com
|
9 |
Text Domain: nginx-helper
|
49 |
add_action( 'shutdown', array( &$this, 'add_timestamps' ), 99999 );
|
50 |
add_action( 'add_init', array( &$this, 'update_map' ) );
|
51 |
|
52 |
+
add_action( 'save_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
|
53 |
+
// add_action( 'publish_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
|
54 |
+
// add_action( 'publish_page', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
|
55 |
add_action( 'wp_insert_comment', array( &$rt_wp_nginx_purger, 'purgePostOnComment' ), 200, 2 );
|
56 |
add_action( 'transition_comment_status', array( &$rt_wp_nginx_purger, 'purgePostOnCommentChange' ), 200, 3 );
|
57 |
|
58 |
+
// $args = array( '_builtin' => false );
|
59 |
+
// $_rt_custom_post_types = get_post_types( $args );
|
60 |
+
// if ( isset( $post_types ) && !empty( $post_types ) ) {
|
61 |
+
// if ( $this->options['rt_wp_custom_post_types'] == true ) {
|
62 |
+
// foreach ( $_rt_custom_post_types as $post_type ) {
|
63 |
+
// add_action( 'publish_' . trim( $post_type ), array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
|
64 |
+
// }
|
65 |
+
// }
|
66 |
+
// }
|
67 |
|
68 |
add_action( 'transition_post_status', array( &$this, 'set_future_post_option_on_future_status' ), 20, 3 );
|
69 |
add_action( 'delete_post', array( &$this, 'unset_future_post_option_on_delete' ), 20, 1 );
|
433 |
|
434 |
add_action( 'init', 'fetch_feeds' );
|
435 |
}
|
|
readme.txt
CHANGED
@@ -3,7 +3,10 @@ Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desai
|
|
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.2.2
|
6 |
-
Stable tag: 1.9
|
|
|
|
|
|
|
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/
|
@@ -113,6 +116,9 @@ Please post your problem in [our free support forum](http://community.rtcamp.com
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
116 |
= 1.9 =
|
117 |
Added Redis cache purge support.
|
118 |
|
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.2.2
|
6 |
+
Stable tag: 1.9.1
|
7 |
+
later (of-.1course)
|
8 |
+
Fix purging for custom post types
|
9 |
+
|
10 |
License: GPLv2 or later (of-course)
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Donate Link: http://rtcamp.com/donate/
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 1.9.1 =
|
120 |
+
Fix purging for custom post types
|
121 |
+
|
122 |
= 1.9 =
|
123 |
Added Redis cache purge support.
|
124 |
|