From 785fd2af846faecbf8aea5130a3a8fad20bcbaca Mon Sep 17 00:00:00 2001 From: Micah Wood Date: Mon, 11 Mar 2024 10:51:18 -0400 Subject: [PATCH] Update endurance-page-cache.php Fixes issue #119 --- endurance-page-cache.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/endurance-page-cache.php b/endurance-page-cache.php index 902d528..147742d 100644 --- a/endurance-page-cache.php +++ b/endurance-page-cache.php @@ -363,7 +363,7 @@ public function to_studly_case( $value ) { /** * Convert a string to snake case. * - * @param string $value String to be converted. + * @param string $value String to be converted. * @param string $delimiter Delimiter (can be a dash for conversion to kebab case). * * @return string @@ -401,9 +401,9 @@ public function skip_404_handling() { * Handlers that listens for changes to options and checks to see, based on the option name, if the cache should * be purged. * - * @param string $option Option name - * @param mixed $old_value Old option value - * @param mixed $new_value New option value + * @param string $option Option name + * @param mixed $old_value Old option value + * @param mixed $new_value New option value * * @return bool */ @@ -534,9 +534,9 @@ public function comment( $comment_id ) { /** * Purge appropriate caches when post when post is updated. * - * @param string $old_status The previous post status - * @param string $new_status The new post status - * @param WP_Post $post The post object of the edited or created post + * @param string $old_status The previous post status + * @param string $new_status The new post status + * @param WP_Post $post The post object of the edited or created post */ public function save_post( $old_status, $new_status, $post ) { @@ -749,7 +749,7 @@ public function purge_cdn_single( $pattern = '' ) { /** * Ensure that a URI isn't purged more than once per minute. * - * @param string $uri URI being purged + * @param string $uri URI being purged * @param string $type The type of throttling * * @return bool True if additional purges should be avoided, false otherwise. @@ -841,7 +841,7 @@ public function purge_request( $uri ) { /** * Get URL to be used for purge requests. * - * @param string $uri The original URI + * @param string $uri The original URI * @param string $scheme The scheme to be used * * @return string @@ -859,7 +859,7 @@ public function get_purge_request_url( $uri, $scheme = 'http' ) { return $base . $uri; } - return str_replace( str_replace( wp_parse_url( home_url(), PHP_URL_PATH ), '', home_url() ), $base, $uri ); + return str_replace( str_replace( wp_parse_url( home_url('/'), PHP_URL_PATH ), '', home_url() ), $base, $uri ); } /** @@ -1560,7 +1560,7 @@ protected function get_triggers( $include_duplicates = false ) { * Calling this method with *no* parameters triggers a full cache wipe for the domain. * Calling this method with relative paths to resources will purge just those resources. * - * @param array $resources (Site paths, image assets, scripts, styles, files, etc) + * @param array $resources (Site paths, image assets, scripts, styles, files, etc) * @param array $override_services (see defaults on self::$udev_api_services) * * @return void @@ -1615,7 +1615,7 @@ protected function udev_cache_api_uri( $services ) { /** * Take hosts (and perhaps specific resources) to purge and encode JSON for request body. * - * @param array $hosts List of hosts + * @param array $hosts List of hosts * @param array $resources List of resources * * @return string|false