From 6430c3066877be9f11af2750f5ac911a41b36dfc Mon Sep 17 00:00:00 2001 From: Augusto Bennemann Date: Tue, 25 Jun 2024 10:44:13 -0300 Subject: [PATCH 1/2] merge: fix conflicts --- admin/class-nginx-helper-admin.php | 6 +++--- admin/class-purger.php | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index f9e13a91..a35ca9d9 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -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; } diff --git a/admin/class-purger.php b/admin/class-purger.php index 41c05853..502a8601 100644 --- a/admin/class-purger.php +++ b/admin/class-purger.php @@ -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 . ' ) ' ); From 704824070eba3742dad83ac218c41b30ceb33476 Mon Sep 17 00:00:00 2001 From: Augusto Bennemann Date: Sat, 20 Sep 2025 11:34:13 -0300 Subject: [PATCH 2/2] Merge branch 'master' into exclude_post_types