[wp-trac] [WordPress Trac] #62101: Add a filter to customize the URL for page caching check in Site Health
WordPress Trac
noreply at wordpress.org
Wed Jan 22 17:27:46 UTC 2025
#62101: Add a filter to customize the URL for page caching check in Site Health
--------------------------------------+--------------------------
Reporter: zetrider | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.8
Component: Site Health | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Comment (by realloc):
While I agree with introducing this filter, I am concerned about the
potential risks of accepting **any** URL. To mitigate these risks, I would
prefer to limit the filter to local URLs still using ''home_url()''.
Here's an example of how this could be implemented:
{{{#!php
<?php
$caching_path = apply_filters( 'site_status_persistent_page_cache_path',
'/' );
$http_response = wp_remote_get( home_url( $caching_path ), compact(
'sslverify', 'headers' ) );
}}}
What do you think about implementing it this way?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62101#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list