Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter( 'rocket_cache_reject_ua', 'wprocket_remove_fb_ua' );
function wprocket_remove_fb_ua( $ua ) {
if ( in_array( 'facebookexternalhit', $ua ) ) {
$ua = array_flip( $ua );
unset( $ua[ 'facebookexternalhit' ] );
$ua = array_flip( $ua );
}
return $ua;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.