@@ -669,9 +669,17 @@ public function set_future_post_option_on_future_status( $new_status, $old_statu
669
669
670
670
global $ blog_id , $ nginx_purger ;
671
671
672
- $ exclude_post_types = array ( 'nav_menu_item ' );
672
+ $ exclude_post_types = apply_filters ( ' rt_nginx_helper_exclude_post_types ' , array ( 'nav_menu_item ' ) );
673
673
674
- if ( in_array ( $ post ->post_type , $ exclude_post_types , true ) ) {
674
+ $ post_type = $ post ->post_type ;
675
+
676
+ if ( in_array ( $ post_type , $ exclude_post_types , true ) ) {
677
+ if ( 'nav_menu_item ' !== $ post_type ) {
678
+ $ nginx_purger ->log ('* * * * * ' );
679
+ $ nginx_purger ->log ('* Post Type update - ' . $ post_type . ' - purge trigger excluded... ' );
680
+ $ nginx_purger ->log ('* Filter: -> rt_nginx_helper_exclude_post_types ' );
681
+ $ nginx_purger ->log ('* * * * * ' );
682
+ }
675
683
return ;
676
684
}
677
685
@@ -691,10 +699,10 @@ public function set_future_post_option_on_future_status( $new_status, $old_statu
691
699
if (
692
700
'future ' === $ new_status && $ post && 'future ' === $ post ->post_status &&
693
701
(
694
- ( 'post ' === $ post -> post_type || 'page ' === $ post -> post_type ) ||
702
+ ( 'post ' === $ post_type || 'page ' === $ post_type ) ||
695
703
(
696
704
isset ( $ this ->options ['custom_post_types_recognized ' ] ) &&
697
- in_array ( $ post -> post_type , $ this ->options ['custom_post_types_recognized ' ], true )
705
+ in_array ( $ post_type , $ this ->options ['custom_post_types_recognized ' ], true )
698
706
)
699
707
)
700
708
) {
0 commit comments