Skip to content

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.

Auto-generated Example

/**
 * 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 );

Parameters

  • string $local_url The local URL of the cached file.
  • string $url The original remote URL.
  • string|int $entity_id The entity identifier.
  • $string_type_the_cache_type Other variable names: $type
  • string $file_path The local file system path.

Files

\do_action( 'activitypub_media_cached', $local_url, $url, $entity_id, static::get_type(), $file_path )

← All Hooks

Users

Developers

Clone this wiki locally