touch cache signal in block regeneration
This commit is contained in:
@@ -86,6 +86,10 @@ function clear_post_cache_based_on_conditions( $post_id, $post ) {
|
|||||||
clear_template_cache('template-parts/home/colon-item');
|
clear_template_cache('template-parts/home/colon-item');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Обновляем сигнальный файл
|
||||||
|
$fpc_signal = WP_CONTENT_DIR . '/uploads/fpcache/.last_modified';
|
||||||
|
touch($fpc_signal);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Хук для обычного сохранения
|
// Хук для обычного сохранения
|
||||||
@@ -105,8 +109,3 @@ add_action('transition_post_status', function($new_status, $old_status, $post) {
|
|||||||
|
|
||||||
clear_post_cache_based_on_conditions($post->ID, $post); // Передаем только $post
|
clear_post_cache_based_on_conditions($post->ID, $post); // Передаем только $post
|
||||||
}, 10, 3);
|
}, 10, 3);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user