-
Notifications
You must be signed in to change notification settings - Fork 88
activitypub_pre_resolve_public_host
github-actions[bot] edited this page Jun 10, 2026
·
2 revisions
Filters the resolved addresses for a hostname before validation.
Returning a non-null array of array{ipv4: string[], ipv6: string[]} skips
the DNS lookup. Tests use this to exercise the validation/preference logic
without making real DNS queries; production code should leave it null.
/**
* Filters the resolved addresses for a hostname before validation.
*
* Returning a non-null array of `array{ipv4: string[], ipv6: string[]}` skips
* the DNS lookup. Tests use this to exercise the validation/preference logic
* without making real DNS queries; production code should leave it null.
*
* @param Activitypub\array{ipv4: $string[],
* @param string $host
* @return Activitypub\array{ipv4: The filtered value.
*/
function my_activitypub_pre_resolve_public_host_callback( Activitypub\array{ipv4: string[],, string $host ) {
// Your code here.
return string[],;
}
add_filter( 'activitypub_pre_resolve_public_host', 'my_activitypub_pre_resolve_public_host_callback', 10, 2 );-
Activitypub\array{ipv4:string[],ipv6: string[]}|null $pre Pre-resolved addresses, or null to perform DNS lookup. -
string$hostThe hostname being resolved.
\apply_filters( 'activitypub_pre_resolve_public_host', null, $host )Follow @activitypub.blog@activitypub.blog for updates and news.