-
Notifications
You must be signed in to change notification settings - Fork 86
activitypub_media_cached
github-actions[bot] edited this page Feb 25, 2026
·
2 revisions
Fires after a remote media file has been successfully cached.
Use this hook for logging, analytics, or post-processing.
/**
* Fires after a remote media file has been successfully cached.
*
* Use this hook for logging, analytics, or post-processing.
*
* @param string $local_url
* @param string $url
* @param string|int $entity_id
* @param mixed $string_type_the_cache_type
* @param string $file_path
*/
function my_activitypub_media_cached_callback( string $local_url, string $url, string|int $entity_id, $string_type_the_cache_type, string $file_path ) {
// Your code here.
}
add_action( 'activitypub_media_cached', 'my_activitypub_media_cached_callback', 10, 5 );-
string$local_urlThe local URL of the cached file. -
string$urlThe original remote URL. -
string|int$entity_idThe entity identifier. -
$string_type_the_cache_typeOther variable names:$type -
string$file_pathThe local file system path.
\do_action( 'activitypub_media_cached', $local_url, $url, $entity_id, static::get_type(), $file_path )Follow @activitypub.blog@activitypub.blog for updates and news.