Inpsyde\MultilingualPress\Core\CachingBasePathAdapter::baseurl PHP Method

baseurl() public method

Returns the correct baseurl path of the current site's uploads folder.
Since: 3.0.0
public baseurl ( ) : string
return string The correct baseurl path of the current site's uploads folder.
    public function baseurl()
    {
        $uploads = $this->get_uploads_dir();
        $base_url = (string) $uploads['baseurl'];
        if (!is_subdomain_install()) {
            return $base_url;
        }
        $site_url = get_option('siteurl');
        if (0 === strpos($base_url, $site_url)) {
            return $base_url;
        }
        return str_replace(parse_url($base_url, PHP_URL_HOST), parse_url($site_url, PHP_URL_HOST), $base_url);
    }