Skip to content

Commit

Permalink
Merge pull request #120 from bluehost/wpscholar-patch-1
Browse files Browse the repository at this point in the history
Update endurance-page-cache.php
  • Loading branch information
wpscholar authored Mar 25, 2024
2 parents bffb793 + 785fd2a commit 48b266a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions endurance-page-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 ) {

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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 );
}

/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 48b266a

Please sign in to comment.