API / Minn\Runtime / SafeUrls

SafeUrls final class

Minn\Runtime\SafeUrls · public/minn/src/Minn/Runtime/SafeUrls.php · 22 lines

Whether an address is one the site may fetch (wp_http_validate_url): an http or https address that survives the protocol check unchanged, whose host is not a private or reserved one unless it is the site's own or http_request_host_is_external lets it through, on a safe port (http_allowed_safe_ports). The address comes back as it was, or false.

Public

staticvalidated(mixed $url): string|false#

The address when it may be fetched, else false.