Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/class-nginx-helper-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,9 @@ public function update_map() {
public function set_future_post_option_on_future_status( $new_status, $old_status, $post ) {

global $blog_id, $nginx_purger;
$exclude_post_types = array( 'nav_menu_item' );

$exclude_post_types = apply_filters( 'rt_nginx_helper_exclude_post_types', array( 'nav_menu_item' ) );

if ( in_array( $post->post_type, $exclude_post_types, true ) ) {
return;
}
Expand Down
6 changes: 6 additions & 0 deletions admin/class-purger.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ public function purge_post_on_comment_change( $newstatus, $oldstatus, $comment )
$_post_id = $comment->comment_post_ID;
$_comment_id = $comment->comment_ID;

$exclude_post_types = apply_filters( 'rt_nginx_helper_comment_change_exclude_post_types', array() );

if ( in_array( get_post_type( $_post_id ), $exclude_post_types, true ) ) {
return;
}

$this->log( '* * * * *' );
$this->log( '* Blog :: ' . addslashes( get_bloginfo( 'name' ) ) . ' ( ' . $blog_id . ' ). ' );
$this->log( '* Post :: ' . get_the_title( $_post_id ) . ' ( ' . $_post_id . ' ) ' );
Expand Down