[Plugin: WordPress MU Domain Mapping] wrong filter plugins_url > domain_mapping_plugins_uri retur
Finally, I found the cause of a very strange fenomenon some of de users of my plugins have run into:
When a plugin like XML Sitemap Feed that uses the function plugins_url() is installed in /mu-plugins/ alongside domain_mapping.php, that plugins call to plugins_url() returns an unexpected response. Depending on the input, the result is one letter, usually ‘p’ or ‘s’. The weird thing is that this does not happen when the plugin is installed in /plugins/ (activated sitewide or not does not matter)…
After going through all the relevant WP code I could only conclude it had to be in the filter triggered at the end of plugins_url(). And so I came to WPMU Domain Mapping since that is the only plugin I know and use that uses this filter.
Specifically, it seems to go wrong in domain_mapping.php at the part
substr( $full_url, stripos( $full_url, PLUGINDIR ) - 1 )on line 612.
Now what is wrong with that, I don’t know but when I either let that function just return $full_url or when I comment out line 620
//add_filter( 'plugins_url', 'domain_mapping_plugins_uri', 1 );the problem is solved.
But will disabling this filter cause problems for other plugins using function plugins_url() which are installed in the regular /plugins/ dir?
- The topic ‘[Plugin: WordPress MU Domain Mapping] wrong filter plugins_url > domain_mapping_plugins_uri retur’ is closed to new replies.