wp_internal_hosts example


function wp_is_internal_link( $link ) {
    $link = strtolower( $link );
    if ( in_array( wp_parse_url( $link, PHP_URL_SCHEME )wp_allowed_protocols(), true ) ) {
        return in_array( wp_parse_url( $link, PHP_URL_HOST )wp_internal_hosts(), true );
    }
    return false;
}
Home | Imprint | This part of the site doesn't use cookies.