[Plugin: WordPress MU Domain Mapping] normalizing resource url with filter
-
Outputting Canonical Resource urls across a multisite network
I am setting up an e-commerce site and am just a hair away from having everything clear for SSL. Here is my predicament. I have one bit of .js that keeps on displaying content from the pre-domain mapped url. Looking at the .js file I see that that url is generated based on the plugins_url. The rest were taken care of using .haccess
Using MikeSchinkel’s advice, I added:
function normalize_resource_url($url) { if (MULTISITE) { $site_url = get_site_url(BLOG_ID_CURRENT_SITE); if (SUBDOMAIN_INSTALL) { $url = preg_replace("#^(https?://[^/]+)(/wp-.*\.(css|js))?$#","{$site_url}\\2",$url); } else { $url = preg_replace("#^({$site_url})(/[^/]+)(/wp-.*\.(css|js))?$#",'\1\3',$url); } } return $url; } add_filter('plugins_url','normalize_resource_url');But I don’t know how this interacts with your domain mapping plugin or if there is something missing that would make it actually work. Any help would be much appreciated.
Peter
http://ww.wp.xz.cn/extend/plugins/wordpress-mu-domain-mapping/
The topic ‘[Plugin: WordPress MU Domain Mapping] normalizing resource url with filter’ is closed to new replies.