Ignoring query parameters
-
Hi,
I’m really impressed with WP Super Cache. Many thanks for all your great work.
I’m trying to make a small enhancement so that if that if all of the parameters on a URL are in the excluded list then that page is served as a supercache file.
At the moment wpsc_remove_tracking_params_from_uri successfully strips all of the parameters but because subsequent parameter checks use empty( $_GET ) rather than checking $wp_cache_request_uri, the page fails the supercache test.
Putting:
if( true == empty( $query ) ) {
$_GET = [];
}at the end of function wpsc_remove_tracking_params_from_uri seems to do the trick but I’d like to find a clean way of achieving this with a proper plugin without modifying the main code.
Any pointers as to how I should do this would be greatly appreciated, as I can’t seem to find a good hook at the moment.
Kind regards,
Tim
The topic ‘Ignoring query parameters’ is closed to new replies.