Quantcast
Channel: WordPress.org Forums » [WordPress MU Domain Mapping] Support
Viewing all articles
Browse latest Browse all 3502

Eric Holmes on "[Plugin: WordPress MU Domain Mapping] MU Plugins not being supported properly [with solution]"

$
0
0

Hi there,

We have a couple mu-plugins using plugin_dir_url(), which is fully supported by WordPress, but not the plugin.

My fix was adding a consideration of what the current directory is, and if it's inside mu-plugins handling it properly.

The new domain_mapping_plugins_uri() function (line 642):

// fixes the plugins_url
function domain_mapping_plugins_uri( $full_url, $path=NULL, $plugin=NULL ) {
	if ( stripos( $full_url, MUPLUGINDIR ) > -1 ) {
		return get_option( 'siteurl' ) . substr( $full_url, stripos( $full_url, MUPLUGINDIR ) - 1 );
	}
	return get_option( 'siteurl' ) . substr( $full_url, stripos( $full_url, PLUGINDIR ) - 1 );
}

https://wordpress.org/plugins/wordpress-mu-domain-mapping/


Viewing all articles
Browse latest Browse all 3502

Trending Articles