This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (JSON.parse(localStorage.getItem('force-reconsent-finished')) !== true) { | |
document.cookie = '_vfa=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/'; | |
localStorage.setItem('force-reconsent-finished', 'true'); | |
console.log ('Force Reconsent Complete'); | |
} else { | |
console.log ('Force Reconsent Not Required'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can fill the below with lines that cover the paths you want to clear cookies for. | |
// We found that the issue started around November 4th, so we decided to clear cookies for | |
// all posts and category pages from October 15th onwards. The list of paths was generated | |
// by querying the CMS. | |
// The script also sets and checks a localStorage value to avoid reruns, and will be retired | |
// from production after a certain amount of time. | |
const p = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Relevanssi add content to custom excerpts. | |
add_filter('relevanssi_excerpt_content', 'custom_fields_to_excerpts', 10, 3); | |
function custom_fields_to_excerpts($content, $post, $query) { | |
$custom_fields = get_post_custom_keys($post->ID); | |
$remove_underscore_fields = true; | |
if (is_array($custom_fields)) { | |
$custom_fields = array_unique($custom_fields); // no reason to index duplicates | |
foreach ($custom_fields as $field) { |