March 9, 2015 at 9:06 am #4050
I’m using domain mapping with my multisite install. This allows me to have a URL work both ways like so:
With default URL:
With custom URL:
Problem is UAF only uses one URL in it’s css file:
So, it doesn’t work because a cross-domain request is made to the font-file, which fails.
My temporary solution is to fix it so that the URL generated by UAF does not contain the domain name, so it will load relative to root, for instance:
Downsides to this approach? Perhaps make it official?
My fix to plugin_interface.php:
$uaf_upload = wp_upload_dir();
$uaf_upload_dir = $uaf_upload[‘basedir’];
$uaf_upload_dir = $uaf_upload_dir . ‘/useanyfont/’;
$uaf_upload_url = $uaf_upload[‘baseurl’];
$uaf_upload_url = $uaf_upload_url . ‘/useanyfont/’;
// $uaf_upload_url = preg_replace(‘#^https?:#’, ”, $uaf_upload_url);
$parts = parse_url($uaf_upload_url);
$uaf_upload_url = “$parts[path]$parts[query]$parts[fragment]”;
$fontsRawData = get_option(‘uaf_font_data’);March 9, 2015 at 4:59 pm #4054
Thank you so much for the proper explanation and the solution.
I will try with this one, test it and if everything goes fine, will use it in next release.
ThanksMay 10, 2015 at 6:30 pm #4304
I have added an option in additional settings called Use relative path for font (Needed when you have domain mapping). . So if user needs it, they can tick this option and enable relative path.
We are going to release this update next day. You can update it from wordpress dashboard.
The topic ‘UAF + Domain Mapping’ is closed to new replies.