Skip to content

Instantly share code, notes, and snippets.

@remyperona
Last active July 13, 2017 14:55
Show Gist options
  • Save remyperona/924748823509c87b468315cd3fbaf1fe to your computer and use it in GitHub Desktop.
Save remyperona/924748823509c87b468315cd3fbaf1fe to your computer and use it in GitHub Desktop.
<?php
add_filter( 'rocket_cache_busting_filename', 'wp_rocket_filter_cache_busting_filename' );
function wp_rocket_filter_cache_busting_filename( $filename ) {
$filename = str_replace( '../', '', $filename );
return $filename;
}
@vinnyusestrict
Copy link

vinnyusestrict commented May 2, 2017

You have a mismatch in the function name declaration (rocket_cache_busting_filename) vs the name in the filter (wp_rocket_filter_cache_busting_filename). Looks like you copied the filter name for the function instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment