keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

fix cache clearing for subdirectory installations #127

Closed coreykn closed 4 years ago

coreykn commented 4 years ago

Fix Cache_Enabler::process_clear_request() to set the correct $clear_url for installations in a subdirectory when the Clear URL Cache admin bar button is used. Previously the subdirectory name was being duplicated. This has been the current behavior since version 1.1.0 when this feature was first introduced (d91a78b). The get_home_url() value returned is checked for a URL path. If a URL path exists, indicating a subdirectory is used, then it is removed before concatenating it with the received $_SERVER['REQUEST_URI'].

Fixes #126