small improvement in modals with diviengine-form-builder
This commit is contained in:
24
plugins/fipfcard_plugin/php/test_cache.php
Normal file
24
plugins/fipfcard_plugin/php/test_cache.php
Normal 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');
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user