Skip to content

Instantly share code, notes, and snippets.

@danielhomer
Created September 2, 2015 09:04
Show Gist options
  • Save danielhomer/8ff50130df23a5099487 to your computer and use it in GitHub Desktop.
Save danielhomer/8ff50130df23a5099487 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'check_less_compile', function( $value ) {
if ( defined( 'KEYSTONE_CACHE_BUST' ) && KEYSTONE_CACHE_BUST ) {
$less_cache_bust = get_option( 'less_cache_bust', false );
if ( $less_cache_bust === KEYSTONE_CACHE_BUST ) {
$value = false;
} else {
update_option( 'less_cache_bust', KEYSTONE_CACHE_BUST );
$value = true;
}
}
return $value;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment