small improvement in modals with diviengine-form-builder

This commit is contained in:
asus
2024-02-22 11:50:01 +01:00
parent 1262aeb706
commit 1046390f59
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
function prevent_page_caching( $headers ) {
error_log("in prevent_page_caching");
if (is_page('test-form-modals')) {
error_log("in test-form-modals");
$headers['Cache-Control'] = 'no-cache, no-store, must-revalidate';
$headers['Pragma'] = 'no-cache';
$headers['Expires'] = '0';
}
return $headers;
}
add_filter( 'nocache_headers', 'prevent_page_caching' );
function add_custom_meta_tags() {
error_log("add_custom_meta_tags");
echo '<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">';
echo '<meta http-equiv="Pragma" content="no-cache">';
echo '<meta http-equiv="Expires" content="0">';
}
add_action('wp_head', 'add_custom_meta_tags');
?>