public static function is_external_url($url)
    {
        if (\parse_url($url, PHP_URL_HOST) === Request::get_host()) {
            return false;
        }

        if (\strpos($url, "/") === 0) {
            return false;
        }

        return true;
    }
public static function is_external_url($url)
    {
        if (\parse_url($url, PHP_URL_HOST) === Request::get_host()) {
            return false;
        }

        if (\strpos($url, "/") === 0) {
            return false;
        }

        return true;
    }
public static function is_external_url ( $ url ) { if ( \ parse_url ( $ url , PHP_URL_HOST ) === Request :: get_host ( ) ) { return false ; } if ( \ strpos ( $ url , "/" ) === 0 ) { return false ; } return true ; }
Check if a URL is off-site or not.

@param string $url The URL to check.
@return bool
Check if a URL is off - site or not .