Last active
July 9, 2018 15:04
-
-
Save Tabrisrp/ca210e27285390dddd03205543ad2b2d to your computer and use it in GitHub Desktop.
This file contains 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
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