Plugin Directory

Changeset 1191338


Ignore:
Timestamp:
07/02/2015 05:17:31 PM (11 years ago)
Author:
rahul286
Message:

Fixed CPT purge issue

Location:
nginx-helper/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nginx-helper/trunk

    • Property svn:ignore
      •  

        old new  
        55.gitattributes
        66.gitignore
         7tests
        78map.conf
        89nginx.log
  • nginx-helper/trunk/nginx-helper.php

    r1190839 r1191338  
    44  Plugin URI: https://rtcamp.com/nginx-helper/
    55  Description: Cleans nginx's fastcgi/proxy cache whenever a post is edited/published. Also does few more things.
    6   Version: 1.9
     6  Version: 1.9.1
    77  Author: rtCamp
    88  Author URI: https://rtcamp.com
     
    5050            add_action( 'add_init', array( &$this, 'update_map' ) );
    5151
    52             add_action( 'publish_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
    53             add_action( 'publish_page', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
     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 );
    5455            add_action( 'wp_insert_comment', array( &$rt_wp_nginx_purger, 'purgePostOnComment' ), 200, 2 );
    5556            add_action( 'transition_comment_status', array( &$rt_wp_nginx_purger, 'purgePostOnCommentChange' ), 200, 3 );
    5657
    57             $args = array( '_builtin' => false );
    58             $_rt_custom_post_types = get_post_types( $args );
    59             if ( isset( $post_types ) && !empty( $post_types ) ) {
    60                 if ( $this->options['rt_wp_custom_post_types'] == true ) {
    61                     foreach ( $_rt_custom_post_types as $post_type ) {
    62                         add_action( 'publish_' . trim( $post_type ), array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
    63                     }
    64                 }
    65             }
     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            // }
    6667
    6768            add_action( 'transition_post_status', array( &$this, 'set_future_post_option_on_future_status' ), 20, 3 );
     
    433434    add_action( 'init', 'fetch_feeds' );
    434435}
    435 
  • nginx-helper/trunk/readme.txt

    r1190839 r1191338  
    44Requires at least: 3.0
    55Tested up to: 4.2.2
    6 Stable tag: 1.9
     6Stable tag: 1.9.1
     7later (of-.1course)
     8Fix purging for custom post types
     9
    710License: GPLv2 or later (of-course)
    811License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    114117== Changelog ==
    115118
     119= 1.9.1 =
     120Fix purging for custom post types
     121
    116122= 1.9 =
    117123Added Redis cache purge support.
Note: See TracChangeset for help on using the changeset viewer.