-
Notifications
You must be signed in to change notification settings - Fork 82
pre_get_remote_metadata_by_actor
github-actions[bot] edited this page Sep 10, 2025
·
9 revisions
Filters the metadata before it is retrieved from a remote actor.
Passing a non-false value will effectively short-circuit the remote request, returning that value instead.
Default false to continue with the remote request.
/**
* Filters the metadata before it is retrieved from a remote actor.
*
* Passing a non-false value will effectively short-circuit the remote request,
* returning that value instead.
*
* Default false to continue with the remote request.
*
* @param Activitypub\mixed $pre
* @param string $actor
* @return Activitypub\mixed The filtered value.
*/
function my_pre_get_remote_metadata_by_actor_callback( Activitypub\mixed $pre, string $actor ) {
// Your code here.
return $pre;
}
add_filter( 'pre_get_remote_metadata_by_actor', 'my_pre_get_remote_metadata_by_actor_callback', 10, 2 );
-
Activitypub\mixed
$pre
The value to return instead of the remote metadata. -
string
$actor
The actor URL.
apply_filters( 'pre_get_remote_metadata_by_actor', false, $actor )
Follow @[email protected] for updates and news.