-
Notifications
You must be signed in to change notification settings - Fork 83
activitypub_should_cache_url
github-actions[bot] edited this page Feb 11, 2026
·
1 revision
Filters whether a URL should be cached.
Allows preventing specific URLs from being downloaded and cached. Return false to skip caching this URL.
/**
* Filters whether a URL should be cached.
*
* Allows preventing specific URLs from being downloaded and cached.
* Return false to skip caching this URL.
*
* @param bool $should_cache
* @param string $url
* @param mixed $string_type_the_cache_type
* @return bool The filtered value.
*/
function my_activitypub_should_cache_url_callback( bool $should_cache, string $url, $string_type_the_cache_type ) {
// Your code here.
return $should_cache;
}
add_filter( 'activitypub_should_cache_url', 'my_activitypub_should_cache_url_callback', 10, 3 );-
bool$should_cacheWhether to cache this URL. Default true. -
string$urlThe remote URL. -
$string_type_the_cache_typeOther variable names:$type
\apply_filters( 'activitypub_should_cache_url', true, $url, $type )Follow @[email protected] for updates and news.